Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do I compile/target stuff for WebAssembly and integrate it with "usual web" (I need to use some advanced math & WebGL real-time that is too slow in JS)? Is there any good tutorial? Thanks!


Currently, the best supported languages are C, C++, and Rust. Languages that have runtimes require their runtimes to also be compiled in, and so are much heavier weight.

For C and C++, you have emscripten. For Rust, we have an emscripten-based toolchain that works today, but have a PR open for using LLVM's built-in wasm backend.

For emscripten: https://kripken.github.io/emscripten-site/docs/#

For Rust: https://hackernoon.com/compiling-rust-to-webassembly-guide-4... (slightly older but still should work afaik) And the new backend https://github.com/rust-lang/rust/pull/45905


The "awesome wasm" link collection has many good starting points: https://github.com/mbasso/awesome-wasm




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: