A browser-based C# playground β write, compile, and run C# entirely client-side using the .NET 10 WebAssembly runtime and Roslyn. No server. No account. No install.
| π | Monaco-powered editor for a single Program.cs file with C# syntax highlighting, inline diagnostics, and error navigation. |
| Click Run to compile and execute your code inside a dedicated Web Worker running Roslyn and the .NET WebAssembly runtime, entirely in your browser. | |
| β¨οΈ | Supply buffered STDIN before running, and see captured stdout/stderr, exceptions, and timing breakdowns (compile / execute / total) in the output pane. |
| π | Automatic time/space Big-O complexity estimate (with rationale) for the code you just ran. |
| π§± | Resizable, swappable editor/I-O panes, focus modes, and fullscreen support. |
| πΎ | Editor preferences, theme (light/dark/system), and layout are persisted locally so your workspace is restored next time you visit. |
| β‘ | Keyboard shortcuts: Ctrl/Cmd+Enter to run, Shift+F5 to stop, Ctrl/Cmd+S to force-save locally, F11 to toggle fullscreen, plus Monaco's native Find/Replace and Undo/Redo. |
| π | Graceful recovery from runaway programs (e.g. infinite loops): Stop hard-terminates the worker and a fresh one takes its place. |
| π | A clear "unsupported browser" message if required capabilities (WebAssembly, Web Workers, Blob URLs, local storage) are missing, instead of a silent failure. |
Prerequisites: .NET 10 SDK and Node.js 22+.
# Frontend (dev server with hot reload)
cd codedotnet.web
npm install
npm run dev
# Publish the compiler worker once so the frontend can load it locally
npm run build:workerThen open the printed local URL in your browser.
To produce a production build (as used for GitHub Pages deployment):
cd codedotnet.web
npm run build:worker:release
npm run build
| Path | Purpose |
|---|---|
π₯οΈ codedotnet.web/ |
React + TypeScript + Vite frontend (editor, shell, worker manager, complexity estimator). |
βοΈ codedotnet.compiler/ |
.NET 10 browser-wasm project: Roslyn compile host, execution host, JS interop. |
β
codedotnet.compiler.tests/ |
xUnit tests for the compiler/execution host logic (linked source, runs natively). |
π€ .github/workflows/deploy.yml |
CI validation + GitHub Pages deployment workflow. |
π¦ .github/dependabot.yml |
Automated weekly dependency updates (npm, NuGet, GitHub Actions). |
π docs/ |
Architecture, testing, deployment, security, privacy, limitations, and ADRs. |
- ποΈ
docs/architecture.mdβ system architecture and component responsibilities. - π§ͺ
docs/testing.mdβ how to run and what each test suite covers. - π
docs/deployment.mdβ CI/CD and GitHub Pages deployment flow. - π
docs/custom-domains.mdβ DNS/CNAME guidance for custom domains. - π
docs/security.mdβ Content-Security-Policy, sandboxing model, dependency scanning. - π΅οΈ
docs/privacy.mdβ what happens to your code, and how to verify it yourself. β οΈ docs/known-limitations.mdβ buffered STDIN, single-file constraint, no NuGet restore, browser resource limits.- π
docs/adr/β Architecture Decision Records (ADR-001 through ADR-008). - Β©οΈ
THIRD-PARTY-NOTICES.mdβ third-party license notices.
MIT β see LICENSE.