Initial commit

This commit is contained in:
2025-06-20 16:12:40 +02:00
commit 4f01e08be5
18 changed files with 1536 additions and 0 deletions

16
rdraught-pi/Cargo.toml Normal file
View File

@@ -0,0 +1,16 @@
[package]
name = "rdraught-pi"
version = "0.1.0"
edition = "2024"
authors = ["Walter Oggioni <oggioni.walter@gmail.com>"]
license = "MIT"
rust-version = "1.87"
[[bin]]
name = "hello"
path = "src/hello.rs"
[dependencies]
panic-halt = "1.0"
libc = { version = "0.2", default-features = false }

17
rdraught-pi/src/hello.rs Normal file
View File

@@ -0,0 +1,17 @@
#![no_std]
#![no_main]
use libc::printf;
extern crate libc;
extern crate panic_halt;
#[link(name = "c", kind = "static")]
unsafe extern "C" {}
#[unsafe(no_mangle)]
pub extern "C" fn main() {
unsafe {
printf("Hello world!!\n".as_ptr() as *const i8);
}
}