FFI from Go to Rust
github.com
github.com
I really hope the concerns that were raised on this issue-page are not simply ignored, and I hope that this new proposal allows for an efficient FFI interface.
The garbage collector has been rewritten for 1.5 and work continues on that front. Once the tree has stabilised (we're in the stabilisation period of our release cycle now) we will have a better idea how to resolve this issue.
I implemented a similar experiment with Haskell and Rust[0]. It does some simple math and also passes a Haskell callback function into Rust code. Unfortunately, I think we lose quite a bit of information by passing through C code (e.g. Rust's parametric polymorphism).
[0] - https://github.com/creichert/haskellrustdemo (Careful, it will not compile with rust 1.0 beta (use of unstable library feature 'libc')).
FYI, `libc` is on crates.io: https://crates.io/crates/libc
Just add `libc` as a dependency in your `Cargo.toml` and you should be good to go on beta (assuming that was the only thing holding you back).
I still think it's cool that the OP tool exists, that's not my point.