Better HN
topnewbestaskshowjobs
Log inSign up

throwaway23H

5 karma · joined Dec 16, 2018 (7y ago) · 3 submissions

Submissions

comment 7y ago · link · parent

You can also download the cross-compilation tarball for musl at https://static.rust-lang.org/dist/rust-std-1.31.0-x86_64-unk... if you installed rust that way. You'd then build normally:

    $ cargo build --target x86_64-unknown-linux-musl

comment 7y ago · link · parent

If you mean producing a wasm module without touching third-party tooling, then this can already be done with Rust today.

The standard rust compiler is capable of cross-compiling out of the box, so the only thing you need in order to produce a working wasm module are the standard libraries which can be obtained from rust-lang.org.

I wrote a somewhat detailed guide about the process here: https://www.reddit.com/r/rust/comments/9t95fd/howto_setting_...