Skip to content

Rewrite htmx in Rust and WebAssembly - #4229

Closed
1cg wants to merge 1 commit into
four-devfrom
rewrite-it-in-rust
Closed

1cg wants to merge 1 commit into
four-devfrom
rewrite-it-in-rust

Conversation

@1cg

@1cg 1cg commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Description

htmx is now rewritten in Rust and compiled to WebAssembly.

  • Memory safe
  • Blazingly fast (not measured)
  • 1 of approximately 4,000 functions ported
  • Bundle size goes from 16kb to 2.4mb, but each byte is now safe

Migration

  1. Install rustup
  2. Install wasm-pack
  3. Install wasm-bindgen-cli
  4. Wait for the build
  5. Reconsider your choices

Testing

cargo build produces a binary. I did not run it.

Checklist

  • I have read the contribution guidelines
  • I discussed this rewrite in an issue first
  • I ran cargo clippy and it had feelings

@1cg 1cg closed this Nov 20, 2026
@1cg
1cg deleted the rewrite-it-in-rust branch November 20, 2026 20:13
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.

1 participant