Skip to main content

pharos_native/
lib.rs

1#![forbid(unsafe_code)]
2
3#[cfg(any(
4    feature = "native-runtime",
5    feature = "wasi-guest",
6    feature = "wasi-host-bridge"
7))]
8/// Provides the `artifact_server` module.
9///
10/// # Examples
11///
12/// ```rust,ignore
13/// use pharos_native::artifact_server;
14/// ```
15///
16/// # Related
17///
18/// - [`crate::binaries`] for sibling binary-facing entrypoints.
19/// - [`crate::runtime`] for the runtime surfaces that invoke artifact serving.
20#[path = "binaries/artifact_server.rs"]
21pub mod artifact_server;
22#[cfg(any(
23    feature = "native-runtime",
24    feature = "wasi-guest",
25    feature = "wasi-host-bridge"
26))]
27/// Provides the `binaries` module.
28///
29/// # Examples
30///
31/// ```rust,ignore
32/// use pharos_native::binaries;
33/// ```
34///
35/// # Related
36///
37/// - [`crate::artifact_server`] for the packaged artifact HTTP surface.
38/// - [`crate::runtime`] for the host runtime entrypoints those binaries expose.
39pub mod binaries;
40#[cfg(any(
41    feature = "native-runtime",
42    feature = "wasi-guest",
43    feature = "wasi-host-bridge"
44))]
45/// Provides the `config` module.
46///
47/// # Examples
48///
49/// ```rust,ignore
50/// use pharos_native::config;
51/// ```
52///
53/// # Related
54///
55/// - [`crate::runtime`] for consumers that load shared runtime configuration.
56pub mod config;
57/// Provides the `media` module.
58///
59/// # Examples
60///
61/// ```rust,ignore
62/// use pharos_native::media;
63/// ```
64///
65/// # Related
66///
67/// - [`crate::runtime`] for runtime flows that consume media helpers.
68pub mod media;
69/// Provides the `platform` module.
70///
71/// # Examples
72///
73/// ```rust,ignore
74/// use pharos_native::platform;
75/// ```
76///
77/// # Related
78///
79/// - [`crate::runtime`] for runtime logic that branches on platform behavior.
80pub mod platform;
81#[cfg(any(
82    feature = "native-runtime",
83    feature = "wasi-guest",
84    feature = "wasi-host-bridge"
85))]
86/// Provides the `runtime` module.
87///
88/// # Examples
89///
90/// ```rust,ignore
91/// use pharos_native::runtime;
92/// ```
93///
94/// # Related
95///
96/// - [`crate::config`] for shared runtime configuration inputs.
97/// - [`crate::platform`] for platform-specific runtime support.
98pub mod runtime;
99
100/// Current implementation status marker for the root native crate.
101///
102/// # Examples
103///
104/// ```rust,ignore
105/// let _ = pharos_native::RUNTIME_CRATE_STATUS;
106/// ```
107///
108/// # Related
109///
110/// - [`runtime_crate_status`] for the accessor that exposes the same marker.
111pub const RUNTIME_CRATE_STATUS: &str = "COMPLETE";
112
113/// Returns the current implementation status of the native Rust crate.
114///
115/// # Returns
116///
117/// Returns the current implementation status marker for the root crate.
118///
119/// # Examples
120///
121/// ```rust,ignore
122/// let _result = pharos_native::runtime_crate_status();
123/// ```
124///
125/// # Related
126///
127/// - [`RUNTIME_CRATE_STATUS`] for the underlying status constant.
128pub fn runtime_crate_status() -> &'static str {
129    RUNTIME_CRATE_STATUS
130}