Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 (Careful, it will not compile with rust 1.0 beta (use of unstable library feature 'libc')).



> (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).




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: