Ah, language and toolchain interoperability, one of my favourite topics ;) Zig has nearly the same problems as Rust: it allows to compile to WASM, it has both a WASI and Emscripten target, with the WASI target working out of the box, but I gave up on the Emscripten target because I just couldn't get it to work.
IMHO it would be great if the Javascript shims and interop could be somehow split out of the Emscripten SDK into a separate, smaller "webapi-wasm-tools" SDK which could be better integrated with other language toolchains. The goal should be that other programming languages can benefit from the work that went into the Emscripten SDK to access web APIs like WebGL, WebGPU, WebAudio etc... up to "EM_JS()" functionality, instead of having to duplicate this work, or requiring a separate installation of the whole Emscripten SDK. There's a very promising project https://github.com/schellingb/wajic by Bernhard Schelling which has the same goals and which was used to port Mattias Gustavsson's DOS-like library to the web: https://mattiasgustavsson.com/wasm/ Anyway... just my 2 cents :) -Floh. On Friday, 24 December 2021 at 15:16:23 UTC+1 caiiiycuk wrote: > Hi! Just want to share my experiment with using Rust and WebAssembly. I > tried to port Vange-rs project (rust + wgpu) to browser. I used emscripten > and unknown platforms. Both finally works, but have lot of obstacles. I am > very sad about support level of emscripten in Rust, hope it will change at > some day. > > https://caiiiycuk.medium.com/vange-rs-webassembly-in-rust-498e2f960a04 > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/99cc45ea-2307-4551-94b8-ecff9ad965a0n%40googlegroups.com.
