mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-12 16:41:21 +00:00
Merge branch 'master' into c-api-extract-instance_context-from-instance
This commit is contained in:
@ -4,19 +4,17 @@ use std::process::Command;
|
||||
fn test_c_api() {
|
||||
let project_tests_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/tests");
|
||||
|
||||
run_command("cmake", project_tests_dir, Some("."));
|
||||
run_command("make", project_tests_dir, Some("-Wdev -Werror=dev"));
|
||||
run_command("make", project_tests_dir, Some("test"));
|
||||
run_command("cmake", project_tests_dir, vec!["."]);
|
||||
run_command("make", project_tests_dir, vec!["-Wdev", "-Werror=dev"]);
|
||||
run_command("make", project_tests_dir, vec!["test", "ARGS=\"-V\""]);
|
||||
}
|
||||
|
||||
fn run_command(command_str: &str, dir: &str, arg: Option<&str>) {
|
||||
println!("Running command: `{}` arg: {:?}", command_str, arg);
|
||||
fn run_command(command_str: &str, dir: &str, args: Vec<&str>) {
|
||||
println!("Running command: `{}` args: {:?}", command_str, args);
|
||||
|
||||
let mut command = Command::new(command_str);
|
||||
|
||||
if let Some(a) = arg {
|
||||
command.arg(a);
|
||||
}
|
||||
command.args(&args);
|
||||
|
||||
command.current_dir(dir);
|
||||
|
||||
|
@ -42,8 +42,9 @@ int main()
|
||||
assert(export_length == 5);
|
||||
|
||||
// Get the `memory` export.
|
||||
wasmer_export_t *export = wasmer_exports_get(exports, 1);
|
||||
wasmer_export_t *export = wasmer_exports_get(exports, 0);
|
||||
wasmer_import_export_kind kind = wasmer_export_kind(export);
|
||||
printf("Wasmer import export kind: %d (Memory is %d)\n", kind, WASM_MEMORY);
|
||||
assert(kind == WASM_MEMORY);
|
||||
|
||||
wasmer_byte_array export_name = wasmer_export_name(export);
|
||||
|
Reference in New Issue
Block a user