News for hackers. Stuff that matters.
Re:ToyDB: Distributed SQL Database in Rust by wizzwizz4 on Sunday July 18, 2021 @03:14PM (#27875670)
But reimplementing SQLite can be done by somebody else, whereas dealing with FFI must be done by me.
Re:ToyDB: Distributed SQL Database in Rust by azornathogron on Sunday July 18, 2021 @04:26PM (#27876378)
I feel like I must be misunderstanding you... why would the FFI be done by you? The rusqlite crate provides wrappers you can use, and there are probably other wrapper crates that I haven't looked at.
Re:ToyDB: Distributed SQL Database in Rust by wizzwizz4 on Sunday July 18, 2021 @05:34PM (#27876904)
But I have to configure how it finds SQLite. Sure, SQLite specifically is fairly easy – I only need to enable the "bundled" crate feature and make sure my Clang version matches the Rust version so LTO works – but it's a little arcane to use Cargo with any non-Rust package in the dependency chain. Cargo Just Works™. Cargo with C FFI doesn't.
Re:ToyDB: Distributed SQL Database in Rust by azornathogron on Sunday July 18, 2021 @05:46PM (#27876990)
Thanks for the explanation!
Re:ToyDB: Distributed SQL Database in Rust by netsec_burn on Sunday July 18, 2021 @05:25PM (#27876820)
Not the parent comment, but I believe they're referring to the cross compilation aspects which wouldn't be resolved by just using the rusqlite crate (I use rusqlite and have this issue).