no-std example

This commit is contained in:
NikVolf 2017-03-30 12:10:12 +03:00
parent 361280897f
commit cac5de598f
3 changed files with 9867 additions and 0 deletions

26
res/cases/v1/test5.rs Normal file
View File

@ -0,0 +1,26 @@
#![feature(link_args)]
#![feature(lang_items)]
#![feature(start)]
#![no_std]
#[lang="panic_fmt"]
extern fn panic_fmt(_: ::core::fmt::Arguments, _: &'static str, _: u32) -> ! {
}
#[lang = "eh_personality"]
extern fn eh_personality() {
}
#[link_args = "-s EXPORTED_FUNCTIONS=['_hello_world']"]
extern {}
#[no_mangle]
pub fn hello_world() -> isize {
45 + 99
}
#[start]
fn main(argc: isize, argv: *const *const u8) -> isize {
/* Intentionally left blank */
0
}

BIN
res/cases/v1/test5.wasm Normal file

Binary file not shown.

9841
res/cases/v1/test5.wast Normal file

File diff suppressed because it is too large Load Diff