r/programmer • • 3d ago

Code I made WasmStudio – a browser-based coding environment for C, C++, Python and Java

Hey everyone!
I’m a student who enjoys programming, and I’ve been working on a personal project called WasmStudio.
The idea came from wanting a simple way to write and run code directly in a browser, without having to install a traditional IDE every time.
So I decided to build one myself!
What it currently supports:
C
C++
Python
Java
A built-in code editor and output panel
It’s still a work in progress, and I’m constantly trying to improve it.
I’d genuinely appreciate some feedback:
What do you think of the interface?
What features would you add?
Would you actually use something like this for learning or quick coding?
This is one of my personal projects, and I’d love to hear honest opinions, including criticism.
I’ll share the project link in the comments if anyone wants to check it out.
Thanks for reading!

1 Upvotes

6 comments sorted by

1

u/VoidspawnRL 3d ago

Look tjat tree-sitter, you can use it ti more then syntax, and it is used in emacs, neovim and a lot orher editor to "understand" code, give fast syntax and you can query the code to make anything

1

u/Parking_Steak2133 3d ago

nstead of old regex matchers that guess based on text patterns, Tree-sitter builds a full concrete syntax tree (CST) incrementally as you type—at sub-millisecond speeds.
Because it actually understands language syntax, editors like Neovim, Emacs, and Helix use it for:
Instant, rock-solid syntax highlighting (no broken colors on weird multiline strings or nested brackets).

Structural code queries using S-expressions (e.g. (function_declaration name: (identifier) @name)to extract functions, classes, or scopes anywhere in the doc).

Smart navigation & text objects (select outer function, jump to next parameter, swap arguments safely).

Incremental parsing so it scales effortlessly even on 50,000+ line files.

It basically brings full compiler AST superpowers straight into the editor canvas!

1

u/VoidspawnRL 3d ago

Yes, and i am sure you can build it to wasm too

1

u/EnpersonneXilef61 3d ago

how are you handling infinite loops if someone writes a bad while condition? running it in a web worker so it doesnt freeze the main UI thread is usually the first hurdle with browser runners

1

u/Parking_Steak2133 3d ago

Code execution runs in a dedicated Web Worker (wasm-worker.js), so even if someone writes while (true), it executes completely off the main thread—the React UI and terminal stay 100% smooth.
If a loop hangs, the main thread can terminate the worker anytime (worker.terminate()) and spawn a clean one instantly without losing editor state.