Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 657110

Summary: dev-lang/rust: add WebAssembly support
Product: Gentoo Linux Reporter: Oleg <O01eg>
Component: Current packagesAssignee: Gentoo Rust Project <rust>
Status: RESOLVED FIXED    
Severity: normal CC: O01eg
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild with wasm support

Description Oleg 2018-06-02 14:00:34 UTC
Created attachment 534512 [details]
ebuild with wasm support

Currently rustc supports compilation wasm32-unknown-unknown target.

I've attached ebuild with new "wasm" USE flags which enables wasm32-unknown-unknown target and installation LLD linker.

Currently it works only with environment RUSTFLAGS="-C linker=lld" but I'm not sure how to fix it.
Comment 1 Larry the Git Cow gentoo-dev 2018-06-06 13:20:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd83e51efadd5a3c9fbb175548bfd3dc42e9db2f

commit bd83e51efadd5a3c9fbb175548bfd3dc42e9db2f
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-06-06 12:49:53 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-06-06 13:20:28 +0000

    dev-lang/rust: version bump to 1.26.2
    
    Also add support for WebAssembly target.
    
    Fixes: https://bugs.gentoo.org/657110
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-lang/rust/Manifest           |   1 +
 dev-lang/rust/metadata.xml       |   2 +
 dev-lang/rust/rust-1.26.2.ebuild | 232 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 235 insertions(+)
Comment 2 Oleg 2018-06-06 17:56:16 UTC
Could you also add to postinst information that it need to add following text into `~/.cargo/config` to work?

```
[target.wasm32-unknown-unknown]
rustflags = ["-C", "lto"]
linker = "lld"
```