Skip to content

Instantly share code, notes, and snippets.

@jjyr
Created June 30, 2020 05:00
Show Gist options
  • Save jjyr/f02be58e5f4c54b5981ea7f602e30488 to your computer and use it in GitHub Desktop.
Save jjyr/f02be58e5f4c54b5981ea7f602e30488 to your computer and use it in GitHub Desktop.
minimal_rust_binary.rs
#![feature(no_core)]
#![feature(lang_items)]
#![feature(optin_builtin_traits, link_args, start)]
#![no_std]
#![no_core]
// Compiler needs these to proceed
#[lang = "sized"]
pub trait Sized {}
#[lang = "copy"]
pub trait Copy {}
#[lang = "freeze"]
auto trait Freeze {}
#[start]
fn start(argc: isize, _argv: *const *const u8) -> isize {
argc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment