Created
May 16, 2014 02:34
-
-
Save mcpherrinm/b20119b581b1c113e60c to your computer and use it in GitHub Desktop.
Minimal standalone rust example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_std] | |
extern "rust-intrinsic" { fn abort() -> !; } | |
#[no_mangle] | |
pub extern "C" fn rust_stack_exhausted() { | |
unsafe { abort() } | |
} | |
#[start] | |
fn start(_:int, _:**u8)->int{ 0 } | |
// compile with rustc test.rs -C link-args="-lc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment