226 private links
A compile time macro similar to Zig
The replacement of the GNU coreutils is not for the sake of security or performance. The expérience will allow to integrate more Rust code in the long term.
- rustlings
- rustfinity
- 100 exercises to learn Rust
- Codecrafters
- Workshops
A bundle size analyzer for rust
The business apps are characteristic because their main complexity comes from the domain: which is not hardware/software related but it's more about modelling complexities of human interactions in code.
The author tells Rust is not good for business apps.
- The stdlib abstractions are right in size and scope, but they are lacking concrete implementations (RNG, cryptoghraphy, serialization, ...). The crate ecosystem is enormous, but it takes time and attention to to sift the wheat from the chaff. Attention that is limited and could be put to better use elsewhere.
- Business apps requires solid defaults for common problems that are desired
- Lifetime and mutability modifiers can not be abstracted the same degree as regular generics
- Cyclic data structures are hard in Rust, because of the borrow checker
- The borrow checker also explicitly makes a conservative assumption that if you call method over some reference, this method will try to access ALL fields of that references, forcing any other field accessed outside of it to be invalidated: the structs must be build in respect to the borrow checker.
- Performance of business apps rarely matters, because the underlying
- To gain performance optimization out of Rust, you need more than "it compiles". Its performance ceiling are excellent (some platforms .NET or Swift choose to work closer to the metal), but its time to performance is low: it falls behind many managed languages on that metric.
- Arc/Rc or Box have few issues: this technique of allocating is nowhere near as fast as bump pointer allocators that managed languages use. The actual win here is when we need to release memory: which in Rust doesn't introduce GC pauses.
and moreYou're here to solve business problems, yet on every step you need to solve "plumbing issues", make decisions about memory model including possible feature changes and refactoring they'll require in the future. [...] you're not going to be praised because your asset management app takes 10% less CPU while the task backlog has doubled in the meantime.
Rust tends to attract those that:
- understand the intrinsic complexity of software;
- have a realistic opinion about their ability to deal with accidental complexity (or lack thereof);
- that look beyond the happy path and methodically reason about failure modes;
- value consistency and predictability.
This is this piece of code that you realise HTML+CSS are awesome :D
Compiling Rust with GCC?
Follow up: https://blog.antoyo.xyz/development-rustc_codegen_gcc-2
I didn't read but it can be useful someday.
Source code: https://github.com/rust-adventure/lets-code-cli-config/blob/main/src/main.rs
Idea from the comments: Look into unwrap or default and implement the default trait, it cleans up the clutter from where you call unwrap_or
A small crate to check which directory
The library provides the location of these directories by leveraging the mechanisms defined by
- the XDG base directory and the XDG user directory specifications on Linux,
- the Known Folder system on Windows, and
- the Standard Directories on macOS.
It can be a good idea.
How the ZIP format has exceptions and sans-io is justified.
Sans-IO is a programming design does not dictate how the implementation runs, but only what to do (as far as I understand).
The dependency inversion principle says that policies (what to do) should not depend on implementation details (how to do it) ‒ https://www.firezone.dev/blog/sans-io#:~:text=the%20dependency%20inversion%20principle%20says%20that%20policies%20(what%20to%20do)%20should%20not%20depend%20on%20implementation%20details%20(how%20to%20do%20it)