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

wasmer: enable cranelift backend #97518

Merged
merged 1 commit into from Jan 18, 2021
Merged

Conversation

simonrainerson
Copy link
Contributor

Motivation for this change

Since wasmer 0.17 no backends are enabled by default. Backends are now detected
using the makefile.
This change enables cranelift as this used to be the old default. At
least one backend is needed for the run subcommand to work. If we want
to replicate the actual logic in the makefile, we would probably want to
enable the singlepass and llvm backend as well. However enabling llvm
backend introduces a dependency on openssl, so we opted for replicating
the old default behavior.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Before
    • /nix/store/mhs0bxgzm2mpabbdxybh5ykcj7q9flxm-wasmer-0.17.0 38.7M
    • /nix/store/mhs0bxgzm2mpabbdxybh5ykcj7q9flxm-wasmer-0.17.0 4056853
  • After
    • /nix/store/hng0a6rkdpaka9335p92pjhxw798lqc7-wasmer-0.17.0 45.7M
    • /nix/store/hng0a6rkdpaka9335p92pjhxw798lqc7-wasmer-0.17.0 47912800
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Since wasmer 0.17 no backends are enabled by default. Backends are now detected
using the [makefile](https://github.com/wasmerio/wasmer/blob/master/Makefile).
This change enables cranelift as this used to be the old default. At
least one backend is needed for the `run` subcommand to work. If we want
to replicate the actual logic in the makefile, we would probably want to
enable the singlepass and llvm backend as well. However enabling llvm
backend introduces a dependency on openssl, so we opted for replicating
the old default behavior.
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 97518 run on x86_64-linux 1

1 package built:
  • wasmer

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 97518 run on x86_64-darwin 1

1 package built:
  • wasmer

Copy link
Member

@Br1ght0ne Br1ght0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested on NixOS.

@Br1ght0ne Br1ght0ne merged commit ab1fb17 into NixOS:master Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants