3 ms·
This is very cool. I'd be interested to see more data interaction and how to call a Go function from Rust. I implemented a similar experiment with Haskell and
by creichert 11y ago
This is very cool. I'd be interested to see more data interaction and how to call a Go function from Rust.
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 https://github.com/creichert/haskellrustdemo
(Careful, it will not compile with rust 1.0 beta (use of unstable library feature 'libc')).
- burntsushi 11y ago> (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 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).