Compiling Rust code is possible, but not within the Arduino IDE [1]. You need to create a Makefile.

For example, if you want to include a function from rust, you would code it as follows:


...