March 2018
Intermediate to advanced
272 pages
7h 4m
English
This might be one of the most interesting nightly features of Rust. Using #[feature(asm)], we will get a new macro, asm!(), which we will be able to use in our code. With this macro, we can write inline assembly to perform fine-grained operations in the code if we need further performance optimizations.
The exact syntax is still being worked on, but it already enables you to write arbitrary assembly code within your functions. This is a must for kernel development, for example, where access to CPU features can only be done by direct CPU instructions. Make sure you thoroughly test this code, since it will be unsafe to use it.
Furthermore, #[feature(naked_functions)] allows you to add the #[naked] attribute ...
Read now
Unlock full access