News for hackers. Stuff that matters.
Re:ToyDB: Distributed SQL Database in Rust by pm90 on Sunday July 18, 2021 @02:50PM (#27875400)
I’m curious to understand what you’re looking to benefit from with a SQLite rust clone vs SQLite itself? Would it make writing apps easier? Or would it open up the internals of dB engines to rust developers? Or something else..? Honest question.
Re:ToyDB: Distributed SQL Database in Rust by netsec_burn on Sunday July 18, 2021 @03:01PM (#27875515)
I think I answered your question in my comment, no? It'll make cross platform builds easier instead of the current steps needed for FFI libraries. My experience with cross platform FFI builds are slim but last time I tried it, it was painful (versus Rust handling it all with the right toolchain).
Re:ToyDB: Distributed SQL Database in Rust by ofrzeta on Sunday July 18, 2021 @03:07PM (#27875590)
Can't be as hard as reimplementing SQLite, can it?
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).