Skip to content

Commit

Permalink
re-include target env wasi
Browse files Browse the repository at this point in the history
  • Loading branch information
james-rms committed Sep 4, 2024
1 parent ade26ba commit 6ecc19b
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions lz4-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
#![no_std]
extern crate libc;

#[cfg(not(all(target_arch = "wasm32", not(any(target_os = "wasi")))))]
#[cfg(not(all(
target_arch = "wasm32",
not(any(target_env = "wasi", target_os = "wasi"))
)))]
pub use libc::{c_char, c_int, c_uint, c_ulonglong, c_void, size_t};

#[cfg(all(target_arch = "wasm32", not(any(target_os = "wasi"))))]
#[cfg(all(
target_arch = "wasm32",
not(any(target_env = "wasi", target_os = "wasi"))
))]
extern crate alloc;

#[cfg(all(target_arch = "wasm32", not(any(target_os = "wasi"))))]
#[cfg(all(
target_arch = "wasm32",
not(any(target_env = "wasi", target_os = "wasi"))
))]
mod wasm_shim;

#[cfg(all(target_arch = "wasm32", not(any(target_os = "wasi"))))]
#[cfg(all(
target_arch = "wasm32",
not(any(target_env = "wasi", target_os = "wasi"))
))]
extern crate std;

#[cfg(all(target_arch = "wasm32", not(any(target_os = "wasi"))))]
#[cfg(all(
target_arch = "wasm32",
not(any(target_env = "wasi", target_os = "wasi"))
))]
pub use std::os::raw::{c_char, c_int, c_uint, c_ulonglong, c_void};

#[cfg(all(target_arch = "wasm32", not(any(target_os = "wasi"))))]
#[cfg(all(
target_arch = "wasm32",
not(any(target_env = "wasi", target_os = "wasi"))
))]
#[allow(non_camel_case_types)]
pub type size_t = usize;

Expand Down

0 comments on commit 6ecc19b

Please sign in to comment.