Is there any documentation/example available to interface to rust? Like in ccall?
I havenât personally tried this, but I know Rust can be told to generate non-mangled externally-callable functions in a shared library: Rust Inside Other Languages. It should be possible to call a function from that shared library using ccall
just like you would with a C library.
I think @Rory-Finnegan was working on improving that but I donât know if he pushed anything.
Yeah, but I gave up when I realized that LambdaInfo
was removed in 0.6 and wasnât clear what the work around should be.
In a recent larger project I have successfully used the path that @rdeits pointed to.The interfacing works smoothly, including passing of structs between rust and julia.
Unfortunately the code is currently not in a public repository, but if you have trouble with a specific step, feel free to ask.
I also tried to auto-generate C header files from my rust interface which could then be wrapped using Clang.jl, but did not succeed. So in the end I hand-coded the ccalls directly.
Please, check out [ANN] Embedding Rust Library in a Julia Package.