Discussion:
Bug#979665: Please package libstd-rust-dev-emscripten
Add Reply
Matt Corallo
2021-01-09 21:30:02 UTC
Reply
Permalink
Package: src:rustc
Version: 1.48.0+dfsg1-2

Due to issues with the way rustc interacts with LLVM-wasm [1], building rust packages with
--target=wasm-unknown-{wasi,unknown} is not practical if any C code is to be used in the same binary (which is common).
Instead, wasm-unknown-emscripten is the only option, however not librust-std is packaged for emscripten. rustup's
emscripten is broken on debian testing due to them shipping their own LLVM, so that is also not a practical solution for
most users wishing to link C and rust code in any context, let alone WASM.


[1] https://github.com/rustwasm/team/issues/291
Matt Corallo
2021-06-14 18:20:01 UTC
Reply
Permalink
This is no longer the case. As of https://github.com/rust-lang/rust/pull/79998 (rustc 1.51) you can now link C and rust
code with the wasm32-wasi target.
Post by Matt Corallo
Package: src:rustc
Version: 1.48.0+dfsg1-2
Due to issues with the way rustc interacts with LLVM-wasm [1], building rust packages with
--target=wasm-unknown-{wasi,unknown} is not practical if any C code is to be used in the same binary (which is common).
Instead, wasm-unknown-emscripten is the only option, however not librust-std is packaged for emscripten. rustup's
emscripten is broken on debian testing due to them shipping their own LLVM, so that is also not a practical solution for
most users wishing to link C and rust code in any context, let alone WASM.
[1] https://github.com/rustwasm/team/issues/291
Ximin Luo
2021-06-15 20:50:01 UTC
Reply
Permalink
Thanks for the update.

Is there much point supporting rust emscripten at all? Apart from this C-linking thing that is now apparently fixed, what is the actual advantage (or even, point) of it?

From what I understand from [1] it seems that emscripten does for C what wasm32-wasi and/or web-sys, js-sys already does for rust?

X

[1] https://stackoverflow.com/questions/64690937/what-is-the-difference-between-emscripten-and-clang-in-terms-of-webassembly-comp
This is no longer the case. As of https://github.com/rust-lang/rust/pull/79998 (rustc 1.51) you can now link C and rust code with the wasm32-wasi target.
Post by Matt Corallo
Package: src:rustc
Version: 1.48.0+dfsg1-2
Due to issues with the way rustc interacts with LLVM-wasm [1], building rust packages with --target=wasm-unknown-{wasi,unknown} is not practical if any C code is to be used in the same binary (which is common). Instead, wasm-unknown-emscripten is the only option, however not librust-std is packaged for emscripten. rustup's emscripten is broken on debian testing due to them shipping their own LLVM, so that is also not a practical solution for most users wishing to link C and rust code in any context, let alone WASM.
[1] https://github.com/rustwasm/team/issues/291
_______________________________________________
Pkg-rust-maintainers mailing list
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-rust-maintainers
--
GPG: ed25519/56034877E1F87C35
https://github.com/infinity0/pubkeys.git
Matt Corallo
2021-06-15 20:50:01 UTC
Reply
Permalink
I'm not exactly an expert on the subject, but my understanding roughly matches yours. wasi is newer and not yet 100%
feature complete, but once it is my understanding is that it should/will be a much better replacement for emscripten.

Matt
Post by Ximin Luo
Thanks for the update.
Is there much point supporting rust emscripten at all? Apart from this C-linking thing that is now apparently fixed, what is the actual advantage (or even, point) of it?
From what I understand from [1] it seems that emscripten does for C what wasm32-wasi and/or web-sys, js-sys already does for rust?
X
[1] https://stackoverflow.com/questions/64690937/what-is-the-difference-between-emscripten-and-clang-in-terms-of-webassembly-comp
This is no longer the case. As of https://github.com/rust-lang/rust/pull/79998 (rustc 1.51) you can now link C and rust code with the wasm32-wasi target.
Post by Matt Corallo
Package: src:rustc
Version: 1.48.0+dfsg1-2
Due to issues with the way rustc interacts with LLVM-wasm [1], building rust packages with --target=wasm-unknown-{wasi,unknown} is not practical if any C code is to be used in the same binary (which is common). Instead, wasm-unknown-emscripten is the only option, however not librust-std is packaged for emscripten. rustup's emscripten is broken on debian testing due to them shipping their own LLVM, so that is also not a practical solution for most users wishing to link C and rust code in any context, let alone WASM.
[1] https://github.com/rustwasm/team/issues/291
_______________________________________________
Pkg-rust-maintainers mailing list
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-rust-maintainers
Blair Noctis
2024-08-31 23:40:01 UTC
Reply
Permalink
FYI, we now have the libstd-rust-dev-wasm32 package, which includes support for
the wasm32-unknown-unknown and wasm32-wasi targets.
--
Sdrager,
Blair Noctis
Loading...