3 ms·
I'm new to Rust. It is possible for a program written in C to link to a library written in Rust? Is it theoretically possible to rewrite Sqlite in Rust and sti
by collinmanderson 11y ago
I'm new to Rust. It is possible for a program written in C to link to a library written in Rust?
Is it theoretically possible to rewrite Sqlite in Rust and still maintain compatibility with programs written in C?
- dbaupp 11y agoYeah, it's one of Rust's strongest features, as it allows progressive migration of native code, and also allows Rust to serve as a fast/low-overhead extension language for Ruby and Python (etc.). More details: - http://doc.rust-lang.org/book/ffi.html#calling-rust-code-from-c http://doc.rust-lang.org/book/ffi.html#calling-rust-code-fro... - http://doc.rust-lang.org/1.6.0/book/rust-inside-other-languages.html http://doc.rust-lang.org/1.6.0/book/rust-inside-other-langua...