Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips & Traps¶
The closest thing to describe Rust Enum is tagged Union. The Rust compiler adds an extra (up to) 8 bytes to the enum to store the discriminator. This is used to identify the variant currently stored in the enum. However, Rust does NOT guarantee that the memory layout of an enum is always a tag followed by a union. Instead, the Rust compiler retains the freedom to optimize the layout of types so that the code can be more memory efficient.
Verify Rust Code
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Easily verify your Rust in CI with Kani and Github Actions
From Fuzzing to Proof: Using Kani with the Bolero Property-Testing Framework
References
Tips on mdBook
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Plugins
mdbook-mermaid
mdbook-mermaid is a preprocessor for mdbook to add mermaid.js support.
References
Unit Testing and Formal Verification in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Test vs Verification
Rust Design-for-Testability: a survey
Rust testing or verifying: Why not both?
KLEE Symbolic Execution Engine
Library-ification and analyzing Rust
References
Bundle Resource Files into a Rust Application
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
The Rust macro include_str includes a UTF-8 encoded file as a string; the Rust macro include_bytes includes a file as a reference to a byte array. Both of those 2 macros load files into the Rust binary at compile time and consume memory at run time. It might not be a good idea to use them for large files!
Rustdef Makes It Dead Simple to Call Rust in Python Notebook
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
- rustimport is a Python library which allows you to import Rust source files directly from Python! It is similar to rustdef @ GitHub but targeting use cases in Python code instead of in Jupyter/Lab notebooks.