Skip to content
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

support for wasm-bindgen? #254

Open
stuebinm opened this issue Apr 1, 2021 · 0 comments
Open

support for wasm-bindgen? #254

stuebinm opened this issue Apr 1, 2021 · 0 comments

Comments

@stuebinm
Copy link

stuebinm commented Apr 1, 2021

I use this overlay to build a project to wasm (in a nix shell):

let
  moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
  nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
in
with nixpkgs;
stdenv.mkDerivation {
  name = "moz_overlay_shell";
  buildInputs = [
    (nixpkgs.latest.rustChannels.stable.rust.override {
      targets = [ "wasm32-unknown-unknown" ];
    })
  ];
}

This works nicely, but now my problem is this: if I call wasm-bindgen on the result, it complains that it is incompatible, since the version in nixpkgs is older than the version in this overlay:

it looks like the Rust project used to create this wasm file was linked against
a different version of wasm-bindgen than this binary:

  rust wasm file: 0.2.73
     this binary: 0.2.67

Currently the bindgen format is unstable enough that these two version must
exactly match, so it's required that these two version are kept in sync by
either updating the wasm-bindgen dependency or this binary. You should be able
to update the wasm-bindgen dependency with:

    cargo update -p wasm-bindgen

or you can update the binary with

    cargo install -f wasm-bindgen-cli

if this warning fails to go away though and you're not sure what to do feel free
to open an issue at https://github.com/rustwasm/wasm-bindgen/issues!

As far as I can see, this overlay does not provide fitting versions of wasm-bindgen along with the versions of rustc, cargo, etc. Could this be added to the overlay, is it declared to be out of scope — or is there some other way which I have missed for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant