11 , withLLVM ? !stdenv.isDarwin
12 , withSinglepass ? !(stdenv.isDarwin && stdenv.isx86_64)
15 rustPlatform.buildRustPackage rec {
19 src = fetchFromGitHub {
22 rev = "refs/tags/v${version}";
23 hash = "sha256-GROw9TYKC53ECJUeYhCez8f2jImPla/lGgsP91tTGjQ=";
26 cargoHash = "sha256-JE7FDF4MWhqJbL7ZP+yzfV7/Z79x0NuQLYNwWwMjAao=";
29 rustPlatform.bindgenHook
32 buildInputs = lib.optionals withLLVM [
36 ] ++ lib.optionals stdenv.isDarwin [
42 # check references to `compiler_features` in Makefile on update
45 "wasmer-artifact-create"
46 "static-artifact-create"
47 "wasmer-artifact-load"
48 "static-artifact-load"
50 ++ lib.optional withLLVM "llvm"
51 ++ lib.optional withSinglepass "singlepass";
53 cargoBuildFlags = [ "--manifest-path" "lib/cli/Cargo.toml" "--bin" "wasmer" ];
55 env.LLVM_SYS_140_PREFIX = lib.optionalString withLLVM llvmPackages.llvm.dev;
57 # Tests are failing due to `Cannot allocate memory` and other reasons
61 description = "The Universal WebAssembly Runtime";
63 Wasmer is a standalone WebAssembly runtime for running WebAssembly outside
64 of the browser, supporting WASI and Emscripten. Wasmer can be used
65 standalone (via the CLI) and embedded in different languages, running in
68 homepage = "https://wasmer.io/";
69 license = licenses.mit;
70 maintainers = with maintainers; [ Br1ght0ne shamilton ];