346 private links
Another product supporting Rust.
It should provide insights on rust crates.
What bad patterns are encouraged by design in Rust?
- complicated types
- complicated macro
- premature optimizations with lifetimes among others
A text editor... for lawyers.
We have it for developers and for scientists (I mean you LaTeX and Overleaf).
Why not as it can improve their writing.
How a rewrite in Rust is beneficial to read many files? Because it avoids allocation.
Note the program was written once in JS then in Rust.
About using C code:
- there obviously the potential bugs and vulnerabilities in the C code itself and in the code wrapping the C code.
- specific C toolchains, which makes things hard when you do cross compilation.
- you (sometimes) need to deploy the dynamically-linked C library (OpenSSL). It prevents you from using secure FROM scratch container images.
- can't compile it for WebAssembly.
- maintenance! it's hard to review a 2000 line implementation of an encryption algorithm
Pure Rust cryptography is usually around 10-25% slower than an ultra optimized C or assembly code.
Différent ways to handle errors in Rust.
In favor of the clap crate that allows delevopers to build quickly in Rust.
The naive Rust implémentation is 10 times faster than the python one.
It remains 6 times faster than the optimized one.
The Python has a collections.Counter class that is approximately as fast as the naive Rust version.
It does not work on my Raspberry Pi yet for atuin
I get a:
atuin: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.39' not found (required by atuin)
A hello world binary works fine though.
rustup target add armv7-unknown-linux-gnueabihfsudo apt-get install gcc-arm-linux-gnueabihf libgcc-13-dev-armhf-cross- In
~/.cargo/config.toml:[target.armv7-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc" cargo build --target=-armv7-unknown-linux-gnueabihf --target-dir=$(pwd)- Upload the binary in
armv7-unknown-linux-gnueabihf/debugdirectory to the raspberry pi and run it.
After a first successful installation, only 4. and 5. are required.
A comparison of thiserror, anyhow and custom errors.
- In Rust, this struct is 16 bytes (on x86_64, again) and in C, it is 24. This is because Rust is free to reorder the fields to optimize for size, while C is not.
- Social factor: it is more convenient to write a bite more dangerous code than in the equivalent C. Firefox failed two times to parallelize Firefox's style layout twice. They get it right the third time with Rust. Does a junior write faster production code in Rust than in C?
- Compile time vs runtime: Rust provides a bit of safety at runtime (index access)
If C is the fastest language, is there any inherent reason why Rust could not do the same things? At the fundamental level, the answer is “there’s no difference between the two.”
But projects does not work only on the fundamentals, "We’re usually talking about something in the context of engineering, a specific project, with specific developers, with specific time constraints, and so on. I think that there are so many variables that it is difficult to draw generalized conclusions."
Rust is a language for building foundational software. - https://smallcultfollowing.com/babysteps/blog/2025/03/10/rust-2025-intro/
What all clients have in common, however, is that the services they build with Rust are foundational to their core business. Rust is used for building platforms: systems which enable building other systems on top.
This mindset takes away the focus from Rust as a C++ replacement and also explains why so many teams which use languages like Python, TypeScript, and Kotlin are attracted to Rust.
What is less often talked about is that Rust is a language that enables people to move across domain boundaries: from embedded to cloud, from data science to developer tooling.
Rust serves as a catalyst: companies start using it for critical software but then, as they get more comfortable with the language, expand into using it in other areas of their business.
Magisk is a suite of open source software for customizing Android, supporting devices higher than Android 6.0.
The native part is written in Rust.
A joke about rust infrastructure. It becomes obsolete as time goes.