Merge pull request #20 from avr-rust/factor-out-std-stub

Factor out std stub into a crate
This commit is contained in:
Dylan McKay 2020-07-26 00:40:25 +12:00 committed by GitHub
commit 572fb8be7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 17 deletions

View File

@ -20,6 +20,7 @@ build = "core_generator/build.rs"
keywords = ["avr", "arduino", "uno"]
[dependencies]
avr-std-stub = "1.0"
target-cpu-macro = "0.1"
[build-dependencies]

View File

@ -9,6 +9,8 @@
#![no_std]
extern crate avr_std_stub;
pub use self::register::{Register, RegisterBits, RegisterValue};
pub use self::pin::{DataDirection, Pin};
@ -24,6 +26,4 @@ pub mod config;
mod register;
mod pin;
#[doc(hidden)]
pub mod std_stub;

View File

@ -1,15 +0,0 @@
//! Stub methods that `libstd` normally defines.
// These do not need to be in a module, but we group them here for clarity.
pub mod std {
#[lang = "eh_personality"]
#[no_mangle]
pub unsafe extern "C" fn rust_eh_personality(_state: (), _exception_object: *mut (), _context: *mut ()) -> () {
}
#[panic_handler]
fn panic(_info: &::core::panic::PanicInfo) -> ! {
loop {}
}
}