Rust
1. Rust
ID: 7dd61019-39f3-4706-bfc4-ea48bf76da9c CREATED: <2025-01-18 Sat 20:46>->
- The Rust Book
- Rust By Example
-
rustc is the Rust compiler. It is rarely invoked directly by the programmer, but rather indirectly through Cargo. Use the
--verbose
flag to see howrustc
is called, for example in:cargo build --verbose
- The compiler has many options
- The Cargo Book
- Philosophies of Rust and Haskell :hs:
- Rust cryptography libraries: A comprehensive list - LogRocket Blog
- heapsize - syn proc_macro example
- redox-os · GitLab
- Embedded Rust documentation
- GitHub - rust-embedded/wg: Coordination repository of the embedded devices Working Group
- xtensa-rust-quickstart/main.rs at master · MabezDev/xtensa-rust-quickstart · GitHub
- rust/config.rs . github
- Async iterators and generators - JakeArchibald.com
- Introduction - Rust and WebAssembly
- GStreamer / gstreamer-rs · GitLab
- why async fn in traits are hard :async:
- std::pin - Rust
-
- todo macros for code that is not yet written -
unimplemented!
makes no such claims.
- todo macros for code that is not yet written -
- Traits that should be in std, but aren't - libs - Rust Internals
- Macros in Rust :macros:
- The Little Book of Rust Macros :macros:
1.1. Libraries
ID: 8fbe9da2-1d6a-43bc-bd89-cf448d43eab8 CREATED: <2025-03-03 Mon 15:08>
1.1.1. Serde
ID: ffb4e87c-e265-4549-91f9-093e714708c0 CREATED: <2025-02-06 Thu 18:59>
important part of the Rust ecosystem, another dtolnay contribution. If you want to program a data format in the Rust ecosystem, this is how you do it.The way it works is that you define some special structs, a Serializer and a Deserializer which implement the Serialize and Deserialize traits provided by serde, respectively.
You can use these structs to provide your public API. The conventional choice is public top-level functions like from-str and to-string. That's it, your serialization library can now read and write your data format as Rust data types.
- the default behavior is an externally tagged representation (verbose)
The docs use strings as core IO when implementing a custom format, but the convention is to implement for T where T is bound by std::io Read or Write trait. Then you can provide a more robust public API (from_bytes, from_writer, etc).
1.1.2. Dalek
ID: 79ad4134-5182-4001-b404-faeb9abd2474 CREATED: <2025-03-03 Mon 15:09>–
1.2. Rust != C
ID: bb68152d-1794-47d8-86c0-03eb7f9256d7 CREATED: <2025-02-06 Thu 18:59>
Rust is not C. C
is old, i.e. well-supported with a stable ABI,
making the process of creating bindings for a C library a breeze in
many languages.
For a Rust library we need to first appease the compiler, as explained in this section of the Rustonomicon. Among other things it involves changing the calling-convention of functions with a type signature and editing the Cargo.toml file to produce a C-compatible ABI binary. The Rust default ABI is unstable and can't reliably be used like the C ABI can.
1.3. Articles
ID: b11ad05a-5d5f-4974-9364-c3eebb9d15d8 CREATED: <2025-03-03 Mon 20:54>
- A Tiny, Static, Full-Text Search Engine using Rust and WebAssembly | Matthias Endler
- WebAssembly Search Tools for Static Sites — Andrew Healey
- I Built A Snappy Static Full-text Search with WebAssembly, Rust, Next.js, and Xor Filters
- Graf, Thomas Mueller and Lemire, Daniel 2020
- Introduction to High-Level Synthesis from Rust
- Introduction - Poplar
1.4. RFCs
ID: 85f9f317-c6ef-4085-98be-db982b27a193 CREATED: <2025-03-07 Fri 21:52>
1.4.1. cargo-script
ID: 5ffb08b8-d27d-4b1f-ae05-03da0207ccdf CREATED: <2025-03-07 Fri 22:03>–
1.5. best practices
ID: ea2f3f8e-1c8c-4c05-b16c-fb197d346409
https://rust-lang.github.io/api-guidelines/documentation.html also: https://lisp-lang.org/style-guide/