As part of my program, I am going to have a JIT-compiled scripting language with a fair number of built-in functions and such, which I'd like to write in Rust for speed, safety, and abstraction. I can't find anything in InstBuilder that inserts a call to a Rust function. Do I have to write out the function signature myself, or is there some macro ... is there an example I can look at?
Thanks.
My understanding of Cranelift is based on the simplejit-demo by the way
If you pass your function to https://docs.rs/cranelift-simplejit/0.59.0/cranelift_simplejit/struct.SimpleJITBuilder.html#method.symbol and then use the normal declare_function
, you can use it like a function created using cranelift.
Alright cool, thanks
Last updated: Dec 23 2024 at 12:05 UTC