Merge pull request #20 from avr-rust/factor-out-std-stub
Factor out std stub into a crate
This commit is contained in:
commit
572fb8be7c
|
@ -20,6 +20,7 @@ build = "core_generator/build.rs"
|
||||||
keywords = ["avr", "arduino", "uno"]
|
keywords = ["avr", "arduino", "uno"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
avr-std-stub = "1.0"
|
||||||
target-cpu-macro = "0.1"
|
target-cpu-macro = "0.1"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
|
extern crate avr_std_stub;
|
||||||
|
|
||||||
pub use self::register::{Register, RegisterBits, RegisterValue};
|
pub use self::register::{Register, RegisterBits, RegisterValue};
|
||||||
pub use self::pin::{DataDirection, Pin};
|
pub use self::pin::{DataDirection, Pin};
|
||||||
|
|
||||||
|
@ -24,6 +26,4 @@ pub mod config;
|
||||||
|
|
||||||
mod register;
|
mod register;
|
||||||
mod pin;
|
mod pin;
|
||||||
#[doc(hidden)]
|
|
||||||
pub mod std_stub;
|
|
||||||
|
|
||||||
|
|
|
@ -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 {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue