Skip to main content

sim_run_loaders/
lib.rs

1#![deny(unsafe_code)]
2#![deny(missing_docs)]
3//! Low-level loader plugins for the SIM bootloader.
4//!
5//! The crate owns loader mechanisms that the `sim` binary composes behind
6//! feature gates. It deliberately depends on kernel and codec contracts rather
7//! than the SDK umbrella.
8//!
9//! Native and wasm loaders both surface `site` exports as opaque registry
10//! values keyed by placement symbols. The kernel stores the value and export
11//! record; server and agent libraries give the value `EvalSite` behavior.
12
13#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
14mod manifest;
15#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
16mod native;
17#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
18mod native_class;
19#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
20mod native_macro;
21#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
22mod native_number;
23#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
24mod native_site;
25#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
26mod shape;
27#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
28mod shared;
29mod source;
30#[cfg(any(feature = "wasm", test))]
31mod wasm;
32
33#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
34pub use native::{
35    NativeDylibLoader, NativeGuest, encode_native_manifest_response, validate_native_abi_header,
36};
37#[cfg(all(feature = "dynamic-native", not(target_arch = "wasm32")))]
38pub use native_macro::NativeAbiMacro;
39pub use source::{
40    BYTES_SOURCE_KIND, CONTENT_ADDRESS_SOURCE_KIND, PATH_SOURCE_KIND, URL_SOURCE_KIND,
41    bytes_from_payload, bytes_from_source, bytes_source, bytes_source_kind, bytes_source_spec,
42    catalog_bytes_source, catalog_content_address_source, catalog_path_source, catalog_url_source,
43    content_address_payload, content_address_source, content_address_source_kind,
44    content_address_source_spec, is_bytes_source, is_path_source, is_url_source, path_from_payload,
45    path_from_source, path_payload, path_source, path_source_kind, path_source_spec,
46    url_from_payload, url_from_source, url_source, url_source_kind, url_source_spec,
47};
48#[cfg(any(feature = "wasm", test))]
49pub use wasm::{WasmLoader, wasm_load_capability};