Live data from Hacker News

Show HN: Compiling C in the browser using WebAssembly

wasmer.io

1–10 of 74 posts

Re: Show HN: Compiling C in the browser using WebAssembly

#6
post #2

> note: it requires a 100MB download Is this how big a clang toolchain usually is?

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

Re: Show HN: Compiling C in the browser using WebAssembly

#8

Couldn’t a tcc or similarly simple C compiler be used instead of a 100MB Clang? Where’s the C to wasm compiler hiding?

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!

Re: Show HN: Compiling C in the browser using WebAssembly

#9
post #2

> note: it requires a 100MB download Is this how big a clang toolchain usually is?

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

#10

Couldn’t a tcc or similarly simple C compiler be used instead of a 100MB Clang? Where’s the C to wasm compiler hiding?

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.
Post reply on HN