mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
- 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>
46 lines
1.3 KiB
CMake
46 lines
1.3 KiB
CMake
# Copyright (c) Microsoft
|
|
# Licensed under the MIT License.
|
|
|
|
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
Corrosion
|
|
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
|
|
# Use a tag that has a fix for https://github.com/corrosion-rs/corrosion/issues/590
|
|
GIT_TAG 6be991bb34c348dfb8344be22f3606288ea5c7fd
|
|
)
|
|
FetchContent_MakeAvailable(Corrosion)
|
|
|
|
project("regorus-test")
|
|
enable_testing()
|
|
|
|
corrosion_import_crate(
|
|
# Path to <regorus-source-folder>/bindings/ffi/Cargo.toml
|
|
MANIFEST_PATH "../ffi/Cargo.toml"
|
|
# Always build regorus in Release mode.
|
|
PROFILE "release"
|
|
# Only build the "regorus-ffi" crate.
|
|
CRATES "regorus-ffi"
|
|
|
|
# Select specific features in regorus.
|
|
FEATURES "regorus/semver"
|
|
|
|
LOCKED
|
|
|
|
# Link statically
|
|
CRATE_TYPES "cdylib"
|
|
)
|
|
|
|
add_executable(regorus_test main.c)
|
|
# Add path to <regorus-source-folder>/bindings/ffi
|
|
target_include_directories(regorus_test PRIVATE "../ffi")
|
|
target_link_libraries(regorus_test regorus_ffi)
|
|
|
|
add_executable(regorus_rvm_test rvm_tests.c)
|
|
target_include_directories(regorus_rvm_test PRIVATE "../ffi")
|
|
target_link_libraries(regorus_rvm_test regorus_ffi)
|
|
|
|
add_test(NAME regorus_c_engine COMMAND regorus_test)
|
|
add_test(NAME regorus_c_rvm COMMAND regorus_rvm_test)
|