setup project files

Added (most) of the project files to the working tree.
Some work still needs to be done to make the rust/C communication better
before we can fully move on to starting to write the actual applicaiton.
This commit is contained in:
Quinn
2025-04-05 19:54:16 +02:00
committed by Quinn
commit 7a64aefcac
11 changed files with 385 additions and 0 deletions

12
src/lib.rs Normal file
View File

@@ -0,0 +1,12 @@
#![no_std]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[unsafe(no_mangle)]
pub unsafe extern "C" fn get_str() -> *const u8 {
let str = "Hello, World\0";
return str.as_ptr();
}

8
src/main.c Normal file
View File

@@ -0,0 +1,8 @@
#include <stdio.h>
extern char const* get_str(void);
int main(int argc, char** argv) {
(void)argc, (void)argv;
printf("%s\n", get_str());
}