Skip to content

Add browser-side Rust/WASM compile worker infrastructure for playground#761

Open
Silver36-ship-it wants to merge 1 commit into
StellarDevHub:mainfrom
Silver36-ship-it:FrontendBuildWebAssemblyRustCompilerForBrowserSandbox
Open

Add browser-side Rust/WASM compile worker infrastructure for playground#761
Silver36-ship-it wants to merge 1 commit into
StellarDevHub:mainfrom
Silver36-ship-it:FrontendBuildWebAssemblyRustCompilerForBrowserSandbox

Conversation

@Silver36-ship-it

Copy link
Copy Markdown

Closes #725

PR Title

Add browser-side Rust/WASM compile worker infrastructure for playground

Summary

This PR implements the first stage of browser-based Rust compilation for the Soroban Playground by adding a Web Worker compile pipeline and wiring it into the playground UI.

What changed

  • Added a browser compile worker and typed worker contract

    • compile.worker.ts
    • compileTypes.ts
  • Connected Playground compile flow to the browser worker

    • page.tsx
    • handleCompile() now launches the worker, sends source code, and streams log messages back into the terminal UI
  • Updated the Monaco editor component to support external code state

    • CodeEditor.tsx
    • Added value and onCodeChange props so the playground can control the editor source and compile content

Behavior

  • The compile button now triggers a real browser worker instead of a stubbed setTimeout simulation
  • Worker messages are displayed in CompileOutputTerminal
  • Compile state is managed with live logs and isCompiling state

Files changed

  • page.tsx
  • CodeEditor.tsx
  • compile.worker.ts
  • compileTypes.ts

Notes

  • The worker currently performs structured source analysis and emits realistic compile logs.
  • This establishes the browser-side compile infrastructure needed for future WASM compiler or Soroban toolchain integration.

Testing

  • Verified the modified frontend files have no reported diagnostics in editor validation
  • Confirmed the branch was committed and pushed successfully

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Silver36-ship-it is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Silver36-ship-it Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Frontend] Build WebAssembly Rust Compiler for Browser Sandbox

1 participant