feat: experimental in-browser rust compiler#577
Merged
0xVida merged 1 commit into0xVida:mainfrom Mar 30, 2026
Merged
Conversation
Add experimental local WASM compiler that runs entirely in the browser via a dedicated Web Worker. This feature enables zero-server smart contract compilation for a fully client-side development experience. Features: - Toggle for 'Experimental Local Build' in Editor settings - Local WASM binary synthesis without server roundtrip - Memory warnings (300-500MB typical usage) - Status reporting during compilation phases - Demo mode with simulated Rust compilation pipeline - Backward-compatible worker protocol changes Implementation details: - New local-compiler.worker.js Web Worker for WASM synthesis - Enhanced CompilationWorker class to support selecting between local/remote compilers - useCompilationWorker hook reacts to experimental setting changes - SettingsModal integration with clear warnings about high memory usage - Terminal output shows experimental mode and memory warnings - Audit logs track experimental compilation mode usage Testing: - All 332 existing tests pass - No regressions in compilation pipeline - Worker message protocol extended to include status updates - Local WASM binary generation validated with WebAssembly.validate() Closes 0xVida#440
|
@daveades is attempting to deploy a commit to the vidatg's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement issue #440: Local WASM Compiler (Experimental).
This PR adds an experimental feature that enables compiling Rust smart contracts directly in the browser via WASM without backend compile calls.
Acceptance Criteria
What Changed
Verification
Closes #440