With all of the above in place everything looks good, yay!
I tested my small hello world Rust module with the recompiled Rust-enabled kernel:
08:18 ubuntu@lunar$ make RUSTC=rustc-1.62 BINDGEN=bindgen-0.56 RUSTFMT=rustfmt-1.62 KDIR=/home/ubuntu/linux make -C /home/ubuntu/linux M=/tmp/hello modules make[1]: Entering directory '/home/ubuntu/linux' RUSTC [M] /tmp/hello/hello_rust.o MODPOST /tmp/hello/Module.symvers LD [M] /tmp/hello/hello_rust.ko make[1]: Leaving directory '/home/ubuntu/linux' 6.2.0-rc6-kc /tmp/hello (master) 08:18 ubuntu@lunar$ sudo insmod hello_rust.ko [ 138.106010] rust_minimal: Hello from Rust 6.2.0-rc6-kc /tmp/hello (master) 08:18 ubuntu@lunar$ sudo rmmod hello_rust [ 144.318111] rust_minimal: Goodbye from Rust 6.2.0-rc6-kc /tmp/hello (master)
With all of the above in place everything looks good, yay!
I tested my small hello world Rust module with the recompiled Rust-enabled kernel:
08:18 ubuntu@lunar$ make RUSTC=rustc-1.62 BINDGEN= bindgen- 0.56 RUSTFMT= rustfmt- 1.62 KDIR=/home/ ubuntu/ linux ubuntu/ linux' hello_rust. o Module. symvers hello_rust. ko ubuntu/ linux'
make -C /home/ubuntu/linux M=/tmp/hello modules
make[1]: Entering directory '/home/
RUSTC [M] /tmp/hello/
MODPOST /tmp/hello/
LD [M] /tmp/hello/
make[1]: Leaving directory '/home/
6.2.0-rc6-kc /tmp/hello (master)
08:18 ubuntu@lunar$ sudo insmod hello_rust.ko
[ 138.106010] rust_minimal: Hello from Rust
6.2.0-rc6-kc /tmp/hello (master)
08:18 ubuntu@lunar$ sudo rmmod hello_rust
[ 144.318111] rust_minimal: Goodbye from Rust
6.2.0-rc6-kc /tmp/hello (master)