Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657110 - dev-lang/rust: add WebAssembly support
Summary: dev-lang/rust: add WebAssembly support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-02 14:00 UTC by Oleg
Modified: 2018-06-06 17:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild with wasm support (rust-1.26.1.ebuild,6.67 KB, text/plain)
2018-06-02 14:00 UTC, Oleg
Details

Note You need to log in before you can comment on or make changes to this bug.
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"
```