315 private links
Even the best have "No idea" for "Safety" at some places. Another one: https://github.com/rust-lang/rust-analyzer/blob/932186d9c2046257c0a1fc38c1cecf7bc19736c3/crates/hir-def/src/lib.rs#L536
There is an "// SAFETY: Come fight me" in the rust uuid crate :D
The ecosystem is fragmented
One example to illustrate why Go is so great for backend services is that the Go services I'm working on don't even have a reverse proxy / load balancer in front of them. Thanks to Go built-in TLS and ACME (Automatic Certificate Management Environment), they are directly exposed to the internet, something that may not be possible due to the complexity of wiring together rustls and axum and ACME. Small details like that compound fast and considerably improve the deployment, management and operation of your backend services. Hey, even UUIDs are coming to Go's standard library.
Also async Rust will waste your time compared Go and your CI/CD pipelines may take 10 times more time (e.g. 4 minutes for Go, 40 minutes for Rust, for a service of the same size).
It seems Ruby is better with Ruby on Rails
Pertinent comments here about the importance of a large or a small standard library.
I think that what you're actually looking for is The Rule of Least Power, just applied to types. You should choose the lightest weight, conceptually simplest approach you can that keeps the code intelligible to others.
Smart Pointers should be used only when regular borrowing does not work.
AppWrite support Rust with a dedicated SDK
Why?
Async in Rust is hard. The biggest drawback of async is the fragmentation of the ecosystem. Now you have sync functions and libs, async functions and libs, and different runtimes that are incompatible and thus require dedicated libraries for I/O.
An anemic standard library for daily needs.
The steep learning curve before being productive.
When Rust makes the most sense?
- common core for cross-platform apps. Proton leads the way.
- system programming
- embedded development
- insane scale
The project is available at https://github.com/kadir/cloakrs
There are a number of serialization libraries that outperform JSON in NodeJS.
It's important to avoid generating extraneous garbage when doing these kinds of benchmarks.
It's important to provide an appropriately sized buffer when performing serialization.
If you care about serialization performance, consider using a different programming language with better tradeoffs.
A Finite State Transducer seems to be the best algorithm instead of a full index search.
The data don't need to be stored in a database indeed. They only need to be searched as text.
An example of scripts rewritten in Rust
The library parses rich schemas (nested sections, $ref, arrays, key/value maps, pattern properties…) into a navigable form tree, renders it as a keyboard-first editor, and validates the result after every edit so users always see the full list of issues before saving.
It can be useful someday