Initialize Basic JavaScript Processing with SWC and Actix-Web #1

Closed
opened 2025-06-06 22:30:45 +00:00 by rileyseaburg · 0 comments
rileyseaburg commented 2025-06-06 22:30:45 +00:00 (Migrated from github.com)

Issue Title: Initialize Basic JavaScript Processing with SWC and Actix-Web

Description:

Set up foundational JavaScript processing functionality using the SWC ecosystem and integrate it with Actix-Web for server-side rendering. This initial setup should:

  • Parse JavaScript files using swc_ecma_parser.
  • Execute JavaScript using SSR capabilities (ssr_rs).
  • Compile React components with swc_ecma_react_compiler.

Tasks:

  • Create a basic parser implementation using swc_ecma_parser.
  • Integrate SSR rendering logic using the ssr_rs crate.
  • Implement React component compilation using swc_ecma_react_compiler.
  • Test parsing and execution with sample JavaScript and React files.
  • Set up basic Actix-web route handlers to serve rendered components.

Dependencies:

Ensure the following dependencies are correctly set up:

ssr_rs = { version = "0.8.3" }
swc = "25.0.0"
swc_common = "11.1.3"
swc_ecma_parser = "14.0.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0"
thiserror = "2.0.12"
lazy_static = "1.4.0"
swc_ecma_react_compiler = "4.0.2"

Acceptance Criteria:

  • Successful parsing and execution of JavaScript and React scripts.
  • Actix-web server correctly serves rendered React components.

Files Involved:

  • src/execute_script.rs
  • src/lib.rs
  • src/process.rs
  • src/request_prop_handler.rs

Notes:

  • Maintain clean, readable, and modular Rust code.
### Issue Title: Initialize Basic JavaScript Processing with SWC and Actix-Web #### Description: Set up foundational JavaScript processing functionality using the SWC ecosystem and integrate it with Actix-Web for server-side rendering. This initial setup should: * Parse JavaScript files using `swc_ecma_parser`. * Execute JavaScript using SSR capabilities (`ssr_rs`). * Compile React components with `swc_ecma_react_compiler`. #### Tasks: * [ ] Create a basic parser implementation using `swc_ecma_parser`. * [ ] Integrate SSR rendering logic using the `ssr_rs` crate. * [ ] Implement React component compilation using `swc_ecma_react_compiler`. * [ ] Test parsing and execution with sample JavaScript and React files. * [ ] Set up basic Actix-web route handlers to serve rendered components. #### Dependencies: Ensure the following dependencies are correctly set up: ```toml ssr_rs = { version = "0.8.3" } swc = "25.0.0" swc_common = "11.1.3" swc_ecma_parser = "14.0.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" anyhow = "1.0" thiserror = "2.0.12" lazy_static = "1.4.0" swc_ecma_react_compiler = "4.0.2" ``` #### Acceptance Criteria: * Successful parsing and execution of JavaScript and React scripts. * Actix-web server correctly serves rendered React components. #### Files Involved: * `src/execute_script.rs` * `src/lib.rs` * `src/process.rs` * `src/request_prop_handler.rs` #### Notes: * Maintain clean, readable, and modular Rust code.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
riley/rust_js_parser#1
No description provided.