4 ms·
Go and Rust is too heavy and require more dependencies for SQLite. SQLite runs even on the smallest exotic embedded systems.
by ex3ndr 9y ago
Go and Rust is too heavy and require more dependencies for SQLite. SQLite runs even on the smallest exotic embedded systems.
- nickez 9y agoYou can run Rust on atmegas. It doesn't get much more small, but it can get a lot more exotic. https://github.com/avr-rust/rust https://github.com/avr-rust/rust
- jeffreyrogers 9y agoBut then you're forced to use the rust compiler. Sqlite can be included in any project that can use a decent C compiler.
- eropple 9y agoWhy would you be forced to use the Rust compiler? You can generate C headers for a static Rust image.
- jeffreyrogers 9y agoIt brings the Rust compiler in as a dependency. I'm not saying you have to use Rust for the rest of the project, but it complicates things in a way that having C source code that you drop into your project doesn't.
- steveklabnik 9y agoI think you two are talking at cross-purposes. You are correct that building the project would require Rust. Your parent is correct that, with a pre-built binary, you don't need any Rust-specific stuff installed to make this work. Building from source is usual, of course, given the lack of a stable ABI.
- baldfat 9y agoArduino - http://jakegoulding.com/blog/2016/01/02/rust-on-an-arduino-uno/ http://jakegoulding.com/blog/2016/01/02/rust-on-an-arduino-u...
- ex3ndr 9y agoOk, then it leaves us a performance question, right?
- steveklabnik 9y agoIf Rust performance diverges significantly from C, then it's a bug. Bugs do happen! We take bug reports, please file them.
- ex3ndr 9y agobut the point is to have maximum performance. This is most deployed database in the world, the overall impact is incredible. It is not about "significantly" slower.
- steveklabnik 9y agoI said "diverges significantly", that comes on both plus and minus. Right now, Rust can be faster sometimes, but is also slower sometimes. It just depends.
- Sammi 9y agoNo it means there should _not_ be a performance question. It does however mean that there is an issue with supported platforms. Rust has support for all the major platforms already, but C is probably the most widely supported language in existence at all.
- steveklabnik 9y agoThe smallest known Rust ELF binary is 151 bytes.
- chungy 9y agoGiven your user name, I believe you completely, but can you provide a citation for how this was done?
- steveklabnik 9y agoHere's the HN discussion, which also links it https://news.ycombinator.com/item?id=8869167 https://news.ycombinator.com/item?id=8869167 Of course, it's not usual Rust code, but no binary that small is usual code, even in C. The point is to demonstrate that you can strip Rust down to as small as you want/need, not to suggest that every single Rust program is ultra-tiny.
- saagarjha 9y agoI'd say that at that point, it doesn't even matter that you're writing Rust code. Most of the slimming down comes from cutting out cruft that the linker puts in by default.
- steveklabnik 9y agoWell, it matters in that Rust lets you eliminate this in the first place. Not all languages let you do this kind of thing. If you want to write Ruby, you have a VM, even if your program is `a = 5`.
- efficax 9y agoRust has no runtime... so... not sure what you mean by that.