ch1: Remove std
This commit is contained in:
parent
c1084cd578
commit
ad42f53386
4 changed files with 16 additions and 3 deletions
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[build]
|
||||||
|
target = "riscv64gc-unknown-none-elf"
|
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"rust-analyzer.checkOnSave": true,
|
||||||
|
"rust-analyzer.cargo.allTargets": false
|
||||||
|
}
|
6
src/lang_items.rs
Normal file
6
src/lang_items.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
use core::panic::PanicInfo;
|
||||||
|
|
||||||
|
#[panic_handler]
|
||||||
|
fn panic(_info: &PanicInfo) -> ! {
|
||||||
|
loop {}
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
fn main() {
|
#![no_std]
|
||||||
println!("Hello, world!");
|
#![no_main]
|
||||||
}
|
|
||||||
|
mod lang_items;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue