-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust wasm32-unknown-unknown
backend
#89426
Comments
Currently it looks like if you want to use wasm backend (including via wasm-pack crate) you need to use rustup. |
There's a |
@doronbehar It's not sufficient:
|
As far as I know our current rustc derivation doesn't support compiling the buildroot for a different target (unless you recompile the whole compiler, possibly) That is definitely something that I think should be fixed |
Related: #70238 It looks like LLVM and the Rust compiler itself are already built with wasm support, it's just that we don't have a Rust libstd build in place. I was playing around with this a little bit, and have this so far: master...stephank:feat-rust-wasm That adds a Idea was (with some more work) to have a selection of prebuilt libstd targets available that could be added to the Rust platform somehow, plus the user could always add more libstd targets by building from source. But experimenting with what I have so far, it's already raising some issues:
|
@stephank how do you use wasm-pack currently? I have an error where after running
|
I marked this as stale due to inactivity. → More info |
Anyone opposed to updating the title to "Rust |
Also I have managed to get this working here: https://gitlab.com/kevincox/word-store/-/blob/dcfe5a8fca6de4d49cae016acc91948365087dac/default.nix The core is: import <nixpkgs> {
overlays = [
(self: super: {
rustc = (super.rustc.override {
stdenv = self.stdenv.override {
targetPlatform = super.stdenv.targetPlatform // {
parsed = {
cpu = { name = "wasm32"; };
vendor = {name = "unknown";};
kernel = {name = "unknown";};
abi = {name = "unknown";};
};
};
};
}).overrideAttrs (attrs: {
configureFlags = attrs.configureFlags ++ ["--set=build.docs=false"];
});
})
];
} Note that the docs are failing to build on this target, IDK if that is a packaging bug or an upstream bug but just remove that bit to see the issue. It was something about a reference to a unix-only module failing to resolve because it (correctly) isn't available. |
Found a way to build lldap wasm frontend with a self-built rustc: https://gist.github.com/bendlas/b93a26df508cbe57f49901b417cc4af6 |
Should a |
|
Project description
A safe, concurrent, practical language for web
Metadata
The text was updated successfully, but these errors were encountered: