1// https://github.com/rust-lang/rfcs/blob/master/text/2585-unsafe-block-in-unsafe-fn.md
2#![deny(unsafe_op_in_unsafe_fn)]
3// we do some static assertions to make sure C bindings are okay.
4#![allow(clippy::assertions_on_constants)]
56use vasi::VirtualAddressSpaceIndependent;
78pub mod emulated_time;
9pub mod explicit_drop;
10pub mod ipc;
11pub mod notnull;
12pub mod option;
13pub mod rootedcell;
14pub mod shadow_syscalls;
15pub mod shim_event;
16pub mod shim_shmem;
17pub mod simulation_time;
18pub mod syscall_types;
19pub mod util;
2021#[repr(transparent)]
22#[derive(
23 Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Copy, Clone, VirtualAddressSpaceIndependent,
24)]
25pub struct HostId(u32);
2627impl From<u32> for HostId {
28fn from(i: u32) -> Self {
29 HostId(i)
30 }
31}
3233impl From<HostId> for u32 {
34fn from(i: HostId) -> Self {
35 i.0
36}
37}
3839// Force cargo to link against crates that aren't (yet) referenced from Rust
40// code (but are referenced from this crate's C code).
41// https://github.com/rust-lang/cargo/issues/9391
42extern crate logger;
43extern crate shadow_shmem;