-
Notifications
You must be signed in to change notification settings - Fork 829
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
Michael-F-Bryan
committed
Aug 7, 2023
1 parent
9d98b30
commit 3c2d6bf
Showing
7 changed files
with
43 additions
and
14 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use std::process::{Command, Stdio}; | ||
|
||
use rustc_version::{Channel, VersionMeta}; | ||
|
||
fn main() { | ||
if std::env::var("CARGO_FEATURE_JS").is_ok() { | ||
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| "rustc".to_string()); | ||
let mut cmd = Command::new(rustc); | ||
cmd.stdout(Stdio::piped()) | ||
.stderr(Stdio::piped()) | ||
.current_dir(env!("CARGO_MANIFEST_DIR")); | ||
|
||
let VersionMeta { | ||
channel, | ||
short_version_string, | ||
.. | ||
} = VersionMeta::for_command(cmd).unwrap(); | ||
|
||
if channel != Channel::Nightly { | ||
println!( | ||
"cargo:warning={} was compiled with {short_version_string}, \ | ||
but the \"js\" feature requires nightly features. \ | ||
See https://github.com/wasmerio/wasmer/issues/4132 for more context.", | ||
env!("CARGO_PKG_NAME"), | ||
); | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[toolchain] | ||
channel = "1.69" | ||
components = ["rustfmt", "rust-src", "clippy"] | ||
targets = ["wasm32-unknown-unknown"] | ||
profile = "minimal" |