mirror of
https://github.com/ahgamut/rust-ape-example.git
synced 2024-12-22 23:26:31 +00:00
remove commented code
This commit is contained in:
parent
2f9973a168
commit
a93a10e342
1 changed files with 0 additions and 27 deletions
27
src/main.rs
27
src/main.rs
|
@ -1,30 +1,3 @@
|
|||
/*
|
||||
#![no_main]
|
||||
#![no_std]
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
||||
// Since we are passing a C string the final null character is mandatory
|
||||
const HELLO: &'static str = "Hello, world! %d + %d = %d\n\0";
|
||||
let x: i32 = 1;
|
||||
let y: i32 = 2;
|
||||
unsafe {
|
||||
libc::printf(HELLO.as_ptr() as *const _, x, y, x+y);
|
||||
}
|
||||
0
|
||||
}
|
||||
|
||||
#[panic_handler]
|
||||
fn my_panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
*/
|
||||
|
||||
#![feature(restricted_std)]
|
||||
|
||||
pub fn main() {
|
||||
println!("Hello World! This is an APE built with Rust.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue