Skip to content

About

πŸš€ Browser-based C# playground powered by .NET 10 WebAssembly and Roslyn. ✍️ Write, compile, and run C# entirely client-side with πŸ”’ no server, πŸ‘€ no account, and πŸ“¦ no installation.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🧩 codedotnet

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.

.NET 10 React 19 TypeScript Vite License: MIT Deploy

πŸš€ Live demo β†’

image

✨ What it does

πŸ“ 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.

🚦 Quick start

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:worker

Then 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

πŸ—‚οΈ Repository layout

image
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.

πŸ“– Documentation

πŸ“œ License

MIT β€” see LICENSE.

About

πŸš€ Browser-based C# playground powered by .NET 10 WebAssembly and Roslyn. ✍️ Write, compile, and run C# entirely client-side with πŸ”’ no server, πŸ‘€ no account, and πŸ“¦ no installation.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages