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

Go and Rust is too heavy and require more dependencies for SQLite. SQLite runs even on the smallest exotic embedded systems.


You 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



Ok, then it leaves us a performance question, right?


If Rust performance diverges significantly from C, then it's a bug. Bugs do happen! We take bug reports, please file them.


but 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.


I 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.


No 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.


But then you're forced to use the rust compiler. Sqlite can be included in any project that can use a decent C compiler.


Why would you be forced to use the Rust compiler? You can generate C headers for a static Rust image.


It 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.


I 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.


The smallest known Rust ELF binary is 151 bytes.


Given your user name, I believe you completely, but can you provide a citation for how this was done?


Here's the HN discussion, which also links it 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.


I'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.


Well, 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`.


Rust has no runtime... so... not sure what you mean by that.




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

Search: