Skip to content

Conversation

@konard
Copy link
Collaborator

@konard konard commented Jan 22, 2026

Summary

  • Reorganize JavaScript code into js/ folder with dedicated js.yml workflow
  • Add Rust implementation in rust/ folder with rust.yml workflow
  • Move release scripts to root scripts/ folder (shared between JS and Rust)
  • Both implementations provide compatible REST APIs
  • Each language version has its own README, Dockerfile, and GitHub workflow

Changes

Scripts (scripts/ folder)

  • Moved JavaScript release scripts from js/scripts/ to root scripts/
  • Added Rust-specific release scripts (rust-*.mjs) for crates.io publishing
  • Both workflows now use Node.js scripts for consistent version management

JavaScript (js/ folder)

  • Moved all existing code to js/ folder
  • Renamed release.yml to js.yml with path filtering for js/** and scripts/**
  • Created js/README.md for npm package documentation
  • Added changeset for the folder reorganization

Rust (rust/ folder)

  • Created new Rust implementation with axum web framework
  • Compatible REST API endpoints:
    • GET /html?url=<URL> - Render page as HTML
    • GET /markdown?url=<URL> - Convert page to Markdown
    • GET /image?url=<URL> - Screenshot page as PNG (requires Chrome)
    • GET /fetch?url=<URL> - Proxy fetch content
    • GET /stream?url=<URL> - Stream content
  • CLI with --serve, --format, --output, --port options
  • Unit tests for all modules (27 tests passing)
  • rust.yml workflow with multi-OS testing matrix and Node.js scripts for releases
  • rust/README.md for crates.io documentation
  • rust/Dockerfile for microservice deployment

Root Level

  • Updated README.md to document multi-language project structure with scripts/ folder

Test Plan

  • Rust clippy passes with -D warnings
  • Rust fmt check passes
  • All Rust unit tests pass (27 tests)
  • JavaScript lint passes
  • JavaScript format check passes
  • All CI workflows pass

Related Issues

Closes #26

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #26
@konard konard self-assigned this Jan 22, 2026
- Reorganize JavaScript code into js/ folder with dedicated js.yml workflow
- Add Rust implementation in rust/ folder with rust.yml workflow
- Both implementations provide compatible REST APIs:
  - GET /html?url=<URL> - Render page as HTML
  - GET /markdown?url=<URL> - Convert page to Markdown
  - GET /image?url=<URL> - Screenshot page as PNG
  - GET /fetch?url=<URL> - Proxy fetch content
  - GET /stream?url=<URL> - Stream content
- Each language version has its own:
  - README.md for package documentation
  - Dockerfile for microservice deployment
  - GitHub workflow for CI/CD and releases
- Rust implementation uses axum web framework with tokio async runtime
- JavaScript workflow uses changeset-based releases
- Rust workflow uses version-tag based releases

Closes #26

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@konard konard changed the title [WIP] Add Rust support feat: add Rust implementation and reorganize codebase Jan 22, 2026
@konard konard marked this pull request as ready for review January 22, 2026 02:03
konard and others added 5 commits January 22, 2026 03:04
- Fix Rust workflow to use dtolnay/rust-toolchain instead of dtolnay/rust-action
- Add changeset for JavaScript package changes

Co-Authored-By: Claude Opus 4.5 <[email protected]>
axum 0.8.8 requires Rust 1.78+, updated from 1.75 to 1.83
@konard
Copy link
Collaborator Author

konard commented Jan 22, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $14.747285 USD
  • Calculated by Anthropic: $11.409595 USD
  • Difference: $-3.337690 (-22.63%)
    📎 Log file uploaded as Gist (2073KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Collaborator Author

konard commented Jan 23, 2026

./scripts folder can be left at the root, also let's make sure we have all scripts nessesary for both js.yml and rust.yml there.

Ensure all changes are correct, consistent and fully meet the requirements, and both language versions have as similar implementations as possible.

@konard konard marked this pull request as draft January 23, 2026 21:01
@konard
Copy link
Collaborator Author

konard commented Jan 23, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-23T21:01:04.391Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Move JavaScript release scripts from js/scripts/ to root scripts/
- Add Rust-specific release scripts for crates.io publishing
- Update js.yml workflow to reference scripts from ../scripts/
- Update rust.yml workflow to use Node.js scripts for consistency
- Both workflows now use similar patterns for version management and releases

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@konard konard marked this pull request as ready for review January 23, 2026 21:14
@konard
Copy link
Collaborator Author

konard commented Jan 23, 2026

🤖 AI Work Session Complete

The following changes have been made based on your feedback:

Changes Made

  1. Moved scripts to root scripts/ folder - All JavaScript release scripts have been moved from js/scripts/ to the root scripts/ folder as requested
  2. Added Rust release scripts - Created new Rust-specific scripts (rust-*.mjs) for:
    • rust-version-check.mjs - Check if version needs release
    • rust-version-bump.mjs - Bump version in Cargo.toml and CHANGELOG.md
    • rust-version-and-commit.mjs - Version and commit to main
    • rust-publish-crate.mjs - Publish to crates.io
    • rust-create-github-release.mjs - Create GitHub release
  3. Updated workflows - Both js.yml and rust.yml now use Node.js scripts from the root scripts/ folder for consistent version management
  4. Updated README - Project structure now documents the shared scripts/ folder

CI Status

  • ✅ JavaScript CI: All checks passed
  • ✅ Rust CI: All checks passed (lint, fmt, tests on Ubuntu/macOS/Windows, build)

The PR is now ready for review.

@konard
Copy link
Collaborator Author

konard commented Jan 23, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $5.942746 USD
  • Calculated by Anthropic: $3.724801 USD
  • Difference: $-2.217944 (-37.32%)
    📎 Log file uploaded as Gist (775KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 43acf42 into main Jan 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Rust support

2 participants