src/bare-metal/minimal.md
no_std program# // Copyright 2023 Google LLC
# // SPDX-License-Identifier: Apache-2.0
#
#![no_main]
#![no_std]
use core::panic::PanicInfo;
#[panic_handler]
fn panic(_panic: &PanicInfo) -> ! {
loop {}
}
std provides a panic handler; without it we must provide our own.panic-halt.panic = "abort" to
avoid an error about eh_personality.main or any other entry point; it's up to you to
define your own entry point. This will typically involve a linker script and
some assembly code to set things up ready for Rust code to run.