commit 071faa80e62236146b9f4bdf6215343e964e92c1 Author: clizia Date: Sat Aug 23 02:35:47 2025 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff47c2d --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..1dbe06d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "totos" +version = "0.1.0" +edition = "2024" + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..929fc17 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,17 @@ +#![no_std] +#![no_main] + +use core::panic::PanicInfo; + +// this function is the entry point since the linker +// looks for a function named `_start` by default +#[unsafe(no_mangle)] +pub extern "C" fn _start() -> ! { + loop{} +} + +// called on panic +#[panic_handler] +fn panic(_info: &PanicInfo) -> ! { + loop {} +}