wasm_embedded_spec/
api.rs1#![allow(
4 non_snake_case,
5 non_camel_case_types,
6 non_upper_case_globals,
7 clippy::all
8)]
9
10#[cfg(feature = "wiggle")]
11use crate::Error;
12
13#[cfg(feature = "bindgen")]
14pub use cty::c_char;
15
16#[cfg(feature = "wiggle")]
19wiggle::from_witx!({
20 witx: [
21 "./witx/common.witx",
22 "./witx/spi.witx",
23 "./witx/i2c.witx",
24 "./witx/uart.witx",
25 "./witx/gpio.witx",
26 "./witx/device.witx",
27 ],
28 errors: { errno => Error },
29});
30
31#[cfg(feature = "wiggle")]
32pub use types::{Errno, UserErrorConversion};
33
34#[cfg(feature = "wiggle")]
35impl wiggle::GuestErrorType for types::Errno {
36 fn success() -> Self {
37 types::Errno::Ok
38 }
39}
40
41#[cfg(feature = "bindgen")]
43include!(concat!(env!("OUT_DIR"), "/bindings.rs"));