wasmer: 5.0.4 → 6.0.0#405782
Conversation
|
What about the following part from the update request?
|
de28335 to
ed82e2e
Compare
Ya,just a min Hey @patka-123 do you know abou the pacage name failing here? |
ed82e2e to
bec3bcb
Compare
Resolves NixOS#403981 . . .
bec3bcb to
df41b48
Compare
zebreus
left a comment
There was a problem hiding this comment.
Thanks for the patch, @SumitKumar-17, please find below a few suggestions for improvement.
|
|
||
| wasmer = callPackage ../development/interpreters/wasmer { | ||
| llvmPackages = llvmPackages_18; | ||
| make = pkgs.make; |
There was a problem hiding this comment.
There is no pkgs.make. Maybe you meant gnumake
| rustPlatform.buildRustPackage rec { | ||
| pname = "wasmer"; | ||
| version = "5.0.4"; | ||
| version = "6.0.0"; |
There was a problem hiding this comment.
6.0.1 has been released; consider updating directly to that version
| @@ -57,6 +63,22 @@ rustPlatform.buildRustPackage rec { | |||
| # Tests are failing due to `Cannot allocate memory` and other reasons | |||
| doCheck = false; | |||
|
|
|||
There was a problem hiding this comment.
For me, the build fails because cargo-auditable currently passes the enabled features to all crates in the workspace, which breaks the c-api for some reason (see rust-secure-code/cargo-auditable#124).
For reference, here is the error I am getting:
> cargo metadata failure: error: Package `wasmer-c-api v6.0.1 (/build/source/lib/c-api)` does
not have feature `wasmer-compiler-cranelift`. It has an optional dependency with that
name, but that dependency uses the "dep:" syntax in the features table, so it does not
have an implicit feature with that name.
> Dependency `wasmer-compiler-cranelift` would be enabled by these features:
> - `cranelift`
The easiest fix is to add auditable = false; here, which is what a few other packages like wasmtime and wasm-tools already do.
| postBuild = '' | ||
| # Prepare and build the Wasmer C-API | ||
| sed -i 's|SHELL=/usr/bin/env bash|SHELL=${bash}/bin/bash|' Makefile | ||
| make build-capi | ||
| make package-capi | ||
| ''; | ||
|
|
||
| postInstall = '' | ||
| # Install the C-API headers, libs, etc. | ||
| cp -r package/* $out/ | ||
|
|
||
| # Ensure the CLI can locate its assets | ||
| makeWrapper "$out/bin/wasmer" \ | ||
| --set WASMER_DIR "$out" | ||
| ''; |
There was a problem hiding this comment.
make build-capi calls cargo again and builds most of the things we built before again. The final package will also include a lot of duplicate code, as the wasmer executable does not use the wasmer C-API.
Consider a separate package for the c-abi and add that as an optional dependency to wasmer.
Resolves #403981
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.