← Theory library
Rust theory
Ownership, borrowing and the language behind most modern chains.
Easy
- 1. Installing Rust and Cargorustup, cargo and the anatomy of a crate.
- 2. Variables and Mutabilitylet bindings are immutable by default.
- 3. Scalar TypesIntegers, floats, bool and char.
- 4. Tuples, Arrays and SlicesFixed-size compound types.
- 5. Functions and ExpressionsRust is an expression language.
- 6. Control Flowif, loop, while and for.
- 7. OwnershipEvery value has exactly one owner.
- 8. BorrowingReferences read data without owning it.
- 9. Stack and HeapWhere values live.
- 10. String and &strTwo string types and why.
- 11. StructsNamed product types.
- 12. EnumsSum types that carry data.
- 13. Pattern Matchingmatch, if let and while let.
- 14. Option<T>Rust's answer to null.
- 15. Result<T, E>Recoverable errors as values.
- 16. VectorsGrowable arrays.
- 17. HashMap and HashSetKey-value and unique-set storage.
- 18. IteratorsLazy, zero-cost pipelines.
- 19. Modules and Visibilitymod, pub and use.
- 20. Testing and Documentationcargo test, doc tests and clippy.
Medium
- 21. GenericsWrite once, monomorphise for each type.
- 22. TraitsShared behaviour contracts.
- 23. Trait Objects and dynStatic versus dynamic dispatch.
- 24. LifetimesNaming how long references are valid.
- 25. Smart Pointers: Box, Rc, RefCellHeap allocation and shared ownership.
- 26. ClosuresFn, FnMut and FnOnce.
- 27. Iterator Trait in DepthImplementing and composing iterators.
- 28. Error Types and thiserror/anyhowDesigning library and application errors.
- 29. Traits for ConversionFrom, Into, TryFrom and AsRef.
- 30. Generic Data StructuresBuilding reusable containers.
- 31. Threads and Send/SyncFearless concurrency, checked by types.
- 32. Mutex, RwLock and ArcSharing mutable state safely.
- 33. Channels and Message PassingCommunicate by sending values.
- 34. Async/Await BasicsFutures are lazy state machines.
- 35. Serde and SerializationDeriving JSON and binary formats.
- 36. Macrosmacro_rules! and derive macros.
- 37. Performance and ProfilingRelease builds and measurement.
Hard
- 38. Unsafe RustEscaping the checker responsibly.
- 39. FFI and no_stdTalking to C and running bare metal.
- 40. Advanced TraitsAssociated types, GATs and blanket impls.
- 41. Rust in Blockchain NodesWhy chains pick Rust.
- 42. Cryptography CratesHashes, signatures and constant time.
- 43. Solana Programs in RustAccounts, PDAs and compute budget.
- 44. Anchor FrameworkReducing Solana boilerplate safely.
- 45. Rust and WebAssemblyShipping Rust to the browser.
- 46. Testing StrategyProperty tests, fuzzing and coverage.
- 47. Workspaces and Release EngineeringMulti-crate repos and publishing.
- 48. Memory Layout and OptimisationSizes, alignment and cache behaviour.
- 49. Auditing Rust On-chain CodeCommon vulnerability classes.
- 50. Capstone: A Rust Chain ServicePutting the track together.