Zhiyao's Home Page
Zhiyao's Home Page
Home
Posts
Publications
TA
Contribution
Light
Dark
Automatic
Rust
Changing Rust Enum Variant with Mutable Reference
Changing a Rust enum variant through a mutable reference can be achieved either by wrapping the variant attached variable inside
Option
, or better, by introducing an
Undef
variant in the enum.
Zhiyao Ma
Feb 14, 2024
3 min read
Language
Panic Recovery in Rust-based Embedded Systems
Zhiyao Ma
,
Guojun Chen
,
Lin Zhong
Rust Crate Crossbeam's ArrayQueue Can Deadlock
Although
ArrayQueue
contains no explicit spin lock or mutex, its code structure forms a big spin lock and thus deadlock is possible.
Zhiyao Ma
Aug 6, 2023
8 min read
Algorithm
Call Rust Closure From Assembly Code
Calling a Rust closure from assembly code involves erasing the type and converting everything into raw pointers before passing to the assembly code, and then reconstructing Rust objects from the raw pointers once control returns to Rust.
Zhiyao Ma
Last updated on Apr 2, 2023
5 min read
Language
Cite
×