Re:How I got involved in the Rust community
by kaba0 on Saturday December 10, 2022 @04:22AM
(#33931230)
You might want to check out GraalVM’s native compilation. While this step will be slow, you can just use the JVM version for development and compile it at the end/CICD step.
Re:How I got involved in the Rust community
by pjmlp on Saturday December 10, 2022 @09:02AM
(#33932682)
The only caveat is that the compile times are still comparable with C++ and Rust, when Graal kind of analyses the whole world to produce a final binary.
On middle range hardware, it appears to be the moment for a coffee pause, although it has definitly gotten better, specially with updated reachability metadata.
I’ve used a bunch of common languages, Python, JavaScript, Typescript, PHP, Bash, Go etc. Not so common languages such as Haskell.
My first choice for personal projects is now Rust.
The memory/borrow checking to me is just a nice benefit I get from using Rust, I don’t use Rust for the borrow checking.
My main reason for Rust is while it’s not as high level as say Java/Python etc I find it is still at a nice level to work with and can be far more expressive with the enums, traits and generics.
The second big reason I use it is my programs end up fast and efficient with little effort.
The third reason is I can get tiny statically linked binaries that just run anywhere with no dependencies.
Reasons two and three mean I can host my applications on the cheapest, most minimal resources available and still outperform other languages on more expensive hosting. Currently my choice is to stick the binary in a Docker image which ends up sub with a sub 10mb docker image then deploy on the smallest 128mb AWS lambda and pay fractions of a cent to host. Services that need to be long running go on the smallest $5-10 vps’s .
The borrow checker can be a pain however I find the compiler error messages really helpful in it often tells you what you should do to fix the problem with plain English error messages and code suggestions.