diff --git a/recipes/wip/wasm/wasmer/recipe.toml b/recipes/wip/wasm/wasmer/recipe.toml index ec86be221..f170f0967 100644 --- a/recipes/wip/wasm/wasmer/recipe.toml +++ b/recipes/wip/wasm/wasmer/recipe.toml @@ -1,8 +1,21 @@ -# TODO region crate error (https://gitlab.redox-os.org/redox-os/redox/-/work_items/1837) +# TODO remove region crate patch when ready (https://gitlab.redox-os.org/redox-os/redox/-/work_items/1837) +# TODO add redox support to termios-rs [source] git = "https://github.com/wasmerio/wasmer" +patches = [ + "redox.patch" +] +shallow_clone = true [build] template = "custom" script = """ -cookbook_cargo_packages wasmer-cli +package=wasmer-cli +"${COOKBOOK_CARGO}" build \ + --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ + --package "${package}" \ + --release + mkdir -pv "${COOKBOOK_STAGE}/usr/bin" + cp -v \ + "target/${TARGET}/release/${package}" \ + "${COOKBOOK_STAGE}/usr/bin/${package}" """ diff --git a/recipes/wip/wasm/wasmer/redox.patch b/recipes/wip/wasm/wasmer/redox.patch new file mode 100644 index 000000000..42dfacc0c --- /dev/null +++ b/recipes/wip/wasm/wasmer/redox.patch @@ -0,0 +1,11 @@ +diff --git a/Cargo.toml b/Cargo.toml +index 1366f717291..1b8e2f1a480 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -606,3 +606,6 @@ required-features = ["cranelift"] + name = "throw-exception" + path = "examples/throw_exception.rs" + required-features = ["llvm"] ++ ++[patch.crates-io] ++region = { git = 'https://github.com/willnode/region-rs', branch = 'redox' }