#![cfg_attr(
not(any(feature = "embedded", feature = "preinit")),
forbid(unsafe_code)
)]
#![cfg_attr(any(feature = "embedded", feature = "preinit"), deny(unsafe_code))]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod cache;
mod callback;
pub mod callback_handler;
#[cfg(feature = "embedded")]
pub mod embedded;
#[cfg(feature = "embedded-stdlib")]
pub mod embedded_stdlib;
mod error;
mod library;
pub mod net;
pub mod package;
pub mod pool;
pub mod replay;
mod sandbox;
mod schema;
pub mod secrets;
pub mod session;
mod trace;
mod wasm;
#[cfg(feature = "preinit")]
pub mod preinit {
pub use eryx_runtime::linker::NativeExtension;
pub use eryx_runtime::preinit::{PreInitError, pre_initialize};
}
pub use callback::{
Callback, CallbackError, DynamicCallback, DynamicCallbackBuilder, TypedCallback, empty_schema,
};
pub use error::Error;
pub use library::RuntimeLibrary;
pub use net::{ConnectionManager, NetConfig, TcpError, TlsError};
pub use package::{ExtractedPackage, PackageFormat};
pub use pool::{PoolConfig, PoolError, PoolStats, PooledSandbox, SandboxPool};
pub use replay::{
CallbackJournal, CallbackJournalEntry, CallbackOutcome, ReplayCallback, ReplayState,
SuspendedCallback,
};
#[cfg(any(feature = "embedded", feature = "preinit"))]
pub use sandbox::PrecompiledArtifact;
pub use sandbox::{
ExecuteResult, ExecuteStats, ExecutionHandle, ReplayOutcome, ResourceLimits, Sandbox,
SandboxBuilder, state,
};
pub use secrets::{
FileScrubPolicy, OutputScrubPolicy, SecretConfig, generate_placeholder, scrub_placeholders,
};
pub use session::{
InProcessSession, PythonStateSnapshot, Session, SessionExecutor, SnapshotMetadata,
SnapshotSession,
};
#[cfg(feature = "vfs")]
pub use session::{VfsConfig, VolumeMount};
pub use trace::{OutputHandler, TraceEvent, TraceEventKind, TraceHandler};
pub use wasm::{
CallbackRequest, CpuFeatureLevel, ExecutionOutput, NetRequest, OutputRequest, PythonExecutor,
TraceRequest,
};
pub use schema::{JsonSchema, Schema};
pub use tokio_util::sync::CancellationToken;
#[cfg(feature = "macros")]
pub use eryx_macros::callback;
#[cfg(feature = "vfs")]
pub mod vfs {
pub use eryx_vfs::{
ArcStorage, DEFAULT_MAX_BYTES, DirEntry, DirPerms, FilePerms, InMemoryStorage, Metadata,
ScrubbingStorage, VfsCtx, VfsError, VfsFileScrubPolicy, VfsResult, VfsSecretConfig,
VfsState, VfsStorage, VfsView,
};
}