Draft: Support for drivers in Rust
Some preparatory changes:
- Add '
c_
' prefix to compiler configuration field and variables - module: Disable
MODVERSIONS
: no longer needed and complicates Rust support
Infrastructure changes for building (or not building) Rust code:
- Implement configuration for Rust compiler and other build-dependencies
- d/rules.real: Set
KRUSTFLAGS
andHOSTRUSTFLAGS
to make filenames relative
Configuration changes to enable it and the currently useful drivers:
- [amd64,arm64,armhf,loong64,riscv64] Enable building Rust modules
- Enable Rust PHY drivers and their dependencies
Support for building OOT drivers:
- kbuild: Look for target.json under arch directory too
- WIP: linux-headers: Include Rust support files and Recommend rustc
- d/tests/headers-kbuild: Add trivial Rust module
OOT drivers can only be built on the same architecture as was used for src:linux.
I have some local changes to ship Rust sources instead of the build-arch-dependent
*.rmeta
and *.so
files, but that doesn't work (yet).
Edited by Ben Hutchings