wasmtime: build c-api, bump version to 0.40.0
* build wasmtime c-api libraries & headers as the "dev" output. * bump wasmtime source version to 0.40.0.
This commit is contained in:
parent
b5d72febf1
commit
153f2f6f06
@ -2,17 +2,24 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wasmtime";
|
||||
version = "0.39.1";
|
||||
version = "0.40.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bytecodealliance";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-cU03wm1+V++mV7j7VyMtjAYrPldzTysNzpJ8m0q4Rx8=";
|
||||
sha256 = "sha256-i3dtjKy5YTyNkEaDcGxsrd4lbyUBd25OARESbJVK9uY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-DnThste0SbBdpGAUYhmwbdQFNEB3LozyDf0X8r2A90Q=";
|
||||
cargoSha256 = "sha256-wlcYdZ8Akkpicyw74sh4CNwSstCtUJxf+oSEL/mUtKc=";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"--package wasmtime-cli"
|
||||
"--package wasmtime-c-api"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# We disable tests on x86_64-darwin because Hydra runners do not
|
||||
# support SSE3, SSSE3, SSE4.1 and SSE4.2 at this time. This is
|
||||
@ -31,6 +38,18 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=traps::parse_dwarf_info"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# move libs from out to dev
|
||||
install -d -m 0755 $dev/lib
|
||||
install -m 0644 ''${!outputLib}/lib/* $dev/lib
|
||||
rm -r ''${!outputLib}/lib
|
||||
|
||||
install -d -m0755 $dev/include/wasmtime
|
||||
install -m0644 $src/crates/c-api/include/*.h $dev/include
|
||||
install -m0644 $src/crates/c-api/include/wasmtime/*.h $dev/include/wasmtime
|
||||
install -m0644 $src/crates/c-api/wasm-c-api/include/* $dev/include
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Standalone JIT-style runtime for WebAssembly, using Cranelift";
|
||||
homepage = "https://github.com/bytecodealliance/wasmtime";
|
||||
|
Loading…
Reference in New Issue
Block a user