mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
feat(bindings)!: add RVM/Program support across FFI and language bindings (#565)
- FFI: add RVM/Program APIs, execution state accessors, HostAwait handling, and buffer/result helpers in rvm.rs, common.rs, engine.rs. - Compiler: emit HostAwait for __builtin_host_await in function_calls.rs. - RVM tests: add HostAwait regression cases and extend harness for suspend/resume responses in host_await.yaml and mod.rs. - C/C++: add RVM tests/examples and wrapper updates in rvm_tests.c, rvm_tests.cpp, regorus.hpp, plus CMake wiring. - C#: add Program/Rvm bindings, SafeHandle/PInvoke, tests, and example usage in Regorus, RvmProgramTests.cs, Program.cs, and README updates. - Go: add Program/Rvm bindings, tests, and examples in rvm.go, rvm_test.go, main.go. - Java: add Program/Rvm bindings, JNI glue, and examples in lib.rs, regorus, Test.java. - Python: add Program/Rvm bindings and examples in lib.rs, test.py. - WASM: add Program/Rvm bindings and examples in lib.rs, test.js. - Tooling: wire binding tests in xtask and ignore generated Java artifacts in .gitignore. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
0316ccd90c
commit
3f7a5496dc
@@ -44,7 +44,8 @@ impl TestCCommand {
|
||||
if !self.skip_ffi {
|
||||
prepare_ffi_artifacts(self.release, self.frozen)?;
|
||||
}
|
||||
run_binding("bindings/c", "regorus_test", self.release)
|
||||
run_binding("bindings/c", "regorus_test", self.release)?;
|
||||
run_binding("bindings/c", "regorus_rvm_test", self.release)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ impl TestCppCommand {
|
||||
if !self.skip_ffi {
|
||||
prepare_ffi_artifacts(self.release, self.frozen)?;
|
||||
}
|
||||
run_binding("bindings/cpp", "regorus_test", self.release)
|
||||
run_binding("bindings/cpp", "regorus_test", self.release)?;
|
||||
run_binding("bindings/cpp", "regorus_rvm_test", self.release)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,6 +407,7 @@ fn run_regorus_tests(
|
||||
if clean {
|
||||
clean_msbuild_project(®orus_tests)?;
|
||||
}
|
||||
println!("Running Regorus.Tests (includes RVM program tests)...");
|
||||
restore_with_source(
|
||||
®orus_tests,
|
||||
&property_args,
|
||||
|
||||
@@ -40,6 +40,14 @@ impl TestGoCommand {
|
||||
run_go_command(&go_dir, ["mod", "tidy"], "go mod tidy (bindings/go)")?;
|
||||
run_go_command(&go_dir, ["build"], "go build (bindings/go)")?;
|
||||
|
||||
let lib_dir = ffi_dir.join("target").join(profile);
|
||||
let mut go_test = Command::new("go");
|
||||
go_test.current_dir(&go_dir);
|
||||
go_test.arg("test");
|
||||
go_test.arg("./...");
|
||||
add_library_search_path(&mut go_test, &lib_dir);
|
||||
run_command(go_test, "go test ./... (bindings/go)")?;
|
||||
|
||||
let binary = go_test_binary(&go_dir);
|
||||
if !binary.exists() {
|
||||
return Err(anyhow!(
|
||||
@@ -48,7 +56,6 @@ impl TestGoCommand {
|
||||
));
|
||||
}
|
||||
|
||||
let lib_dir = ffi_dir.join("target").join(profile);
|
||||
let mut run = Command::new(&binary);
|
||||
run.current_dir(&go_dir);
|
||||
add_library_search_path(&mut run, &lib_dir);
|
||||
|
||||
Reference in New Issue
Block a user