< 返回版块

kcrazy 发表于 2021-10-19 20:30

Cargo.toml

[package]
name = "hello-world"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib"]

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

[dependencies]

src/lib.rs

#![no_std]

use core::panic::PanicInfo;

/// This function is called on panic.
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
    loop {}
}

fn main() {}

评论区

写评论

还没有评论

1 共 0 条评论, 1 页