Skip to content

Commit

Permalink
Merge pull request #596 from hermit-os/wasmtime-fix
Browse files Browse the repository at this point in the history
fix(examples/wasmtime): support release profile compilation
  • Loading branch information
mkroening authored Jul 1, 2024
2 parents d99c4ac + 054f5cb commit aa1f09d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/wasmtime/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
6 changes: 4 additions & 2 deletions examples/wasmtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ use std::process::Command;
use std::{env, io};

fn main() -> io::Result<()> {
let cargo = env::var_os("CARGO").unwrap();
let out_dir = env::var_os("OUT_DIR").unwrap();

let status = Command::new("cargo")
let status = Command::new(cargo)
.arg("build")
.arg("-Zunstable-options")
.arg("-Zbuild-std=std,panic_abort")
.arg("--target=wasm32-unknown-unknown")
.arg("--package=fibonacci")
.arg("--release")
.arg("--out-dir")
.arg("--target-dir=target")
.arg("--artifact-dir")
.arg(&out_dir)
.status()?;
assert!(status.success());
Expand Down

0 comments on commit aa1f09d

Please sign in to comment.