This commit is contained in:
Jaroslaw Konik 2025-05-14 14:06:42 +02:00
parent e15fb74e64
commit 7eb4a346b8
3 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,3 @@
def test_func
rust_func(5, "test")
end

View file

@ -0,0 +1,7 @@
STATE = {
"a_value" => nil
}
def test_func(a)
STATE["a_value"] = a
end

View file

@ -4,6 +4,8 @@
// TODO: consider dropping magnus
// TODO: unwinding https://doc.rust-lang.org/nomicon/ffi.html#variadic-functions
// TODO: maybe unify api and call non thread methods non_send
// TODO: use ruby arena to rewind state
use std::{
collections::HashMap,
ffi::{c_void, CString},