forked from mirrors/nixpkgs
wasmtime: init and use for emulation
This isn’t really an "emulator" but it’s the closest concept we have right now.
This commit is contained in:
parent
d591a109be
commit
dbb94b984f
|
@ -115,8 +115,8 @@ rec {
|
|||
then "${wine}/bin/${wine-name}"
|
||||
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux
|
||||
then "${qemu-user}/bin/qemu-${final.qemuArch}"
|
||||
else if final.isWasm
|
||||
then "${pkgs.v8}/bin/d8"
|
||||
else if final.isWasi
|
||||
then "${pkgs.wasmtime}/bin/wasmtime"
|
||||
else throw "Don't know how to run ${final.config} executables.";
|
||||
|
||||
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
||||
|
|
1481
pkgs/development/interpreters/wasmtime/cargo-lock.patch
Normal file
1481
pkgs/development/interpreters/wasmtime/cargo-lock.patch
Normal file
File diff suppressed because it is too large
Load diff
31
pkgs/development/interpreters/wasmtime/default.nix
Normal file
31
pkgs/development/interpreters/wasmtime/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ rustPlatform, fetchFromGitHub, lib, python, cmake, llvmPackages, clang }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
name = "wasmtime-${version}";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CraneStation";
|
||||
repo = "wasmtime";
|
||||
rev = "07a6ca8f4e1136ecd9f4af8d1f03a01aade60407";
|
||||
sha256 = "1cq6nz90kaf023mcyblca90bpvbzhq8xjq01laa28v7r50lagcn5";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoSha256 = "17k8n5xar4pvvi4prhm6c51vlim9xqwkkhysbnss299mm3fyh36h";
|
||||
|
||||
cargoPatches = [ ./cargo-lock.patch ];
|
||||
|
||||
nativeBuildInputs = [ python cmake clang ];
|
||||
buildInputs = [ llvmPackages.libclang ];
|
||||
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Standalone JIT-style runtime for WebAsssembly, using Cranelift";
|
||||
homepage = https://github.com/CraneStation/wasmtime;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.matthewbauer ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -23815,4 +23815,6 @@ in
|
|||
stdenv = crossLibcStdenv;
|
||||
};
|
||||
|
||||
wasmtime = callPackage ../development/interpreters/wasmtime {};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue