forked from wasmi-labs/wasmi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da558c7
commit 899cc32
Showing
31 changed files
with
9,717 additions
and
9,528 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
use std::env; | ||
use std::process; | ||
|
||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=./wasm-kernel/"); | ||
println!("cargo:rerun-if-changed=./wasm-kernel/"); | ||
|
||
// The CARGO environment variable provides a path to the executable that | ||
// runs this build process. | ||
let cargo_bin = env::var("CARGO").expect("CARGO env variable should be defined"); | ||
// The CARGO environment variable provides a path to the executable that | ||
// runs this build process. | ||
let cargo_bin = env::var("CARGO").expect("CARGO env variable should be defined"); | ||
|
||
// Build a release version of wasm-kernel. The code in the output wasm binary | ||
// will be used in benchmarks. | ||
let output = process::Command::new(cargo_bin) | ||
.arg("build") | ||
.arg("--target=wasm32-unknown-unknown") | ||
.arg("--release") | ||
.arg("--manifest-path=./wasm-kernel/Cargo.toml") | ||
.arg("--verbose") | ||
.output() | ||
.expect("failed to execute `cargo`"); | ||
// Build a release version of wasm-kernel. The code in the output wasm binary | ||
// will be used in benchmarks. | ||
let output = process::Command::new(cargo_bin) | ||
.arg("build") | ||
.arg("--target=wasm32-unknown-unknown") | ||
.arg("--release") | ||
.arg("--manifest-path=./wasm-kernel/Cargo.toml") | ||
.arg("--verbose") | ||
.output() | ||
.expect("failed to execute `cargo`"); | ||
|
||
if !output.status.success() { | ||
let msg = format!( | ||
"status: {status}\nstdout: {stdout}\nstderr: {stderr}\n", | ||
status=output.status, | ||
stdout=String::from_utf8_lossy(&output.stdout), | ||
stderr=String::from_utf8_lossy(&output.stderr), | ||
); | ||
panic!("{}", msg); | ||
} | ||
if !output.status.success() { | ||
let msg = format!( | ||
"status: {status}\nstdout: {stdout}\nstderr: {stderr}\n", | ||
status = output.status, | ||
stdout = String::from_utf8_lossy(&output.stdout), | ||
stderr = String::from_utf8_lossy(&output.stderr), | ||
); | ||
panic!("{}", msg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.