Earlier quoted context omitted.
The whole LLVM toolchain is a bit big. I think we can reduce much more the size. We actually researched on using tcc but unfortunately tcc doesn’t have a wasm backend (for generating wasm output). It would be awesome if they added it!
Check out https://github.com/tyfkda/xcc , I've only used the native backend, but it's small and fast.
Show HN: Compiling C in the browser using WebAssembly
11–20 of 74 posts
Re: Show HN: Compiling C in the browser using WebAssembly
#12Is it possible/already existing to have interactive C++ lessons where the user's C++ code is compiled an run client-side in a web page?
Re: Show HN: Compiling C in the browser using WebAssembly
#13Re: Show HN: Compiling C in the browser using WebAssembly
#14100MB on every page refresh just to compile C is a pretty bold direction to go in.
Re: Show HN: Compiling C in the browser using WebAssembly
#15I currently have a use case that uses a server running an emscripten build (using SMODULARIZE and some exports, I suppose it’s not a true dylib)
Re: Show HN: Compiling C in the browser using WebAssembly
#16Earlier quoted context omitted.
The Clang WASI SDK weights about 100Mb compressed. We optimized things a bit but still have a way to go (we are not yet compressing in the network). I believe we can serve everything in about 30Mb
MB, right? Mb is megabit I only have to bring this up because network providers still insist on measuring bits
Re: Show HN: Compiling C in the browser using WebAssembly
#17Then it becomes a fully self-sustaining OS that can live forever in a browser.
Re: Show HN: Compiling C in the browser using WebAssembly
#18Now all this needs is a simple OS running in a browser, that can edit and compile itself, post the resulting binary onto a WebDAV somewhere, and reload itself from there. Then it becomes a fully self-sustaining OS that can live forever in a browser.
Ideally http3 over webtransport-p2p!
Then add some network discovery so we can advertise & find what's available on our networks!