Commit 028b01b0 authored by Jeff Waugh's avatar Jeff Waugh

Add "no_std" feature for cargo users

parent 373cc86b
......@@ -8,6 +8,9 @@ readme = "README.md"
keywords = ["unsafe", "va_list", "ffi", "c"]
license = "MIT"
[features]
no_std = []
[dev-dependencies.va_list-helper]
version = "*"
path = "deps/helper/"
/*
*
*/
#[cfg(nightly)] use core::prelude::*;
#[cfg(nightly)] use core::{mem,ptr};
#[cfg(not(nightly))] use std::{mem,ptr};
use std::{mem,ptr};
use super::VaPrimitive;
#[allow(non_camel_case_types)]
......
#[cfg(nightly)] use core::{mem,ptr};
#[cfg(not(nightly))] use std::{mem,ptr};
use std::{mem,ptr};
use super::VaPrimitive;
#[allow(non_camel_case_types)]
......
......@@ -17,11 +17,16 @@
* }
* ```
*/
#![cfg_attr(nightly,feature(no_std))]
#![cfg_attr(no_std,no_std)]
#![cfg_attr(any(feature="no_std",nightly),feature(no_std))]
#![cfg_attr(any(feature="no_std",no_std),no_std)]
#![crate_type="lib"]
#![crate_name="va_list"]
#[cfg(any(feature="no_std",no_std))] #[doc(hidden)]
mod std {
pub use core::{mem,ptr};
}
// x86_64 on unix platforms is _usually_ ELF.
#[cfg(target_arch="x86_64")] #[cfg(target_family="unix")]
#[path="impl-x86_64-elf.rs"] mod imp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment