000a24234c
- 3 screenshots at 1284x2778 (iPhone 6.5"): note list, note detail, settings - Docker WebDAV setup with 9 demo notes in Denote format for local screenshots - Fix theme not applying to NoteListView and NoteEditorView: move tint/preferredColorScheme from App.body (Scene) to RootView.body (View) so @Observable tracking works correctly - NoteEditorView (sheet) now also gets preferredColorScheme and tint directly - Add debug.password UserDefaults fallback in DEBUG builds for screenshot automation
1020 B
1020 B
Learning Rust
Why Rust?
- Memory safety without garbage collection
- Zero-cost abstractions
- Fearless concurrency
- Great tooling (cargo, clippy, rustfmt)
Ownership Rules
- Each value has exactly one owner
- When the owner goes out of scope, the value is dropped
- You can have either one mutable reference or many immutable ones
fn main() {
let s1 = String::from("hello");
let s2 = s1; // s1 is moved, no longer valid
println!("{}", s2);
}
The Borrow Checker
The borrow checker enforces ownership rules at compile time. This eliminates entire classes of bugs:
- Use-after-free
- Double-free
- Data races
- Null pointer dereferences
Resources
- The Rust Book — start here
- Rust by Example — hands-on
- Rustlings — small exercises