5.2. Adding the #[no_std] attribute to your crate

External resources

Adding #[no_std]

As an embedded target with no operating system, many faculties that the Rust standard library requires are not and could not be supported on AVR.

Because of this, only #[no_std] crates may be compiled for AVR.


#![allow(unused)]
fn main() {
// src/main.rs or src/lib.rs

#![no_std]

fn my_function() {
    // ...
}

// ...
}