feat: add 'reserved word' construct
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
parent
2a63077cac
commit
201b41cf11
31 changed files with 2367 additions and 1628 deletions
|
|
@ -182,13 +182,21 @@ pub fn run_wasm(args: &BuildWasm) -> Result<()> {
|
|||
pub fn run_wasm_stdlib() -> Result<()> {
|
||||
let export_flags = include_str!("../../lib/src/wasm/stdlib-symbols.txt")
|
||||
.lines()
|
||||
.map(|line| format!("-Wl,--export={}", &line[1..line.len() - 1]))
|
||||
.map(|line| format!("-Wl,--export={}", &line[1..line.len() - 2]))
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
let mut command = Command::new("target/wasi-sdk-21.0/bin/clang-17");
|
||||
let mut command = Command::new("docker");
|
||||
|
||||
let output = command
|
||||
.args([
|
||||
"run",
|
||||
"--rm",
|
||||
"-v",
|
||||
format!("{}:/src", std::env::current_dir().unwrap().display()).as_str(),
|
||||
"-w",
|
||||
"/src",
|
||||
"ghcr.io/webassembly/wasi-sdk",
|
||||
"/opt/wasi-sdk/bin/clang",
|
||||
"-o",
|
||||
"stdlib.wasm",
|
||||
"-Os",
|
||||
|
|
|
|||
|
|
@ -139,6 +139,9 @@ struct Test {
|
|||
/// Don't capture the output
|
||||
#[arg(long)]
|
||||
nocapture: bool,
|
||||
/// Enable the wasm tests.
|
||||
#[arg(long, short)]
|
||||
wasm: bool,
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ pub fn run(args: &Test) -> Result<()> {
|
|||
} else {
|
||||
let mut cargo_cmd = Command::new("cargo");
|
||||
cargo_cmd.arg("test");
|
||||
if args.wasm {
|
||||
cargo_cmd.arg("--features").arg("wasm");
|
||||
}
|
||||
if !test_flags.is_empty() {
|
||||
cargo_cmd.arg(test_flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue