You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
microwatt/rust_lib_demo
Benjamin Herrenschmidt e3941109af console: Cleanup console API
Use a more generic console_init() instead of potato_uart_init(),
and do the same for interrupt control. There should be no
change in behaviour.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3 years ago
..
.cargo Add Rust demo 3 years ago
src Add Rust demo 3 years ago
Cargo.toml rust_lib_demo: Update package dependencies to fix a build error 3 years ago
Makefile hello_world: Use new headers and frequency from syscon 3 years ago
README.md Update README.md 3 years ago
Xargo.toml Add Rust demo 3 years ago
console.c console: Move console files 3 years ago
console.h console: Move console files 3 years ago
head.S Add Rust demo 3 years ago
hello_world.c console: Cleanup console API 3 years ago
powerpc.lds Add Rust demo 3 years ago

README.md

I made a minimal Rust demo.

This needs a rebuild of the core library with xargo (https://github.com/japaric/xargo) for working soft floating-point support.

Steps:

$ rustup default nightly

$ rustup target add powerpc64le-unknown-linux-gnu

$ rustup component add rust-src

$ cargo install xargo

$ make
$ make run

ln -sf hello_world.bin main_ram.bin
../core_tb > /dev/null
Hello World
Rust
i 2
5
5
i 3
3.3333333333333335
3.3333333333333335
[-9, -6, 2, 3]
!panicked at 'test', src/lib.rs:58:5