2020-01-09 10:59:51 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, llvmPackages
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wasmer";
|
2020-05-12 09:01:43 +01:00
|
|
|
version = "0.17.0";
|
2020-01-09 10:59:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wasmerio";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-05-12 09:01:43 +01:00
|
|
|
sha256 = "05g4h0xkqd14wnmijiiwmhk6l909fjxr6a2zplrjfxk5bypdalpm";
|
2020-01-09 10:59:51 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2020-05-12 09:01:43 +01:00
|
|
|
cargoSha256 = "1ssmgx9fjvkq7ycyzjanqmlm5b80akllq6qyv3mj0k5fvs659wcq";
|
2020-01-09 10:59:51 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
2020-09-09 09:16:52 +01:00
|
|
|
# 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).
|
|
|
|
# Enabling cranelift as this used to be the old default. At least one backend is
|
|
|
|
# needed for the run subcommand to work.
|
2021-02-15 10:51:27 +00:00
|
|
|
cargoBuildFlags = [ "--features" "backend-cranelift" ];
|
2020-09-09 09:16:52 +01:00
|
|
|
|
2020-01-09 10:59:51 +00:00
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The Universal WebAssembly Runtime";
|
|
|
|
longDescription = ''
|
|
|
|
Wasmer is a standalone WebAssembly runtime for running WebAssembly outside
|
|
|
|
of the browser, supporting WASI and Emscripten. Wasmer can be used
|
|
|
|
standalone (via the CLI) and embedded in different languages, running in
|
|
|
|
x86 and ARM devices.
|
|
|
|
'';
|
|
|
|
homepage = "https://wasmer.io/";
|
|
|
|
license = licenses.mit;
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2020-01-09 10:59:51 +00:00
|
|
|
};
|
|
|
|
}
|