Expand description
Provides the binaries module.
§Examples
ⓘ
use pharos_native::binaries;§Related
crate::artifact_serverfor the packaged artifact HTTP surface.crate::runtimefor the host runtime entrypoints those binaries expose.
Enums§
- Binary
Target - Public enum
BinaryTargetused by this module.
Constants§
- BINARY_
TARGETS - Public constant
BINARY_TARGETSexposed by this module. - MODULE_
STATUS - Public constant
MODULE_STATUSexposed by this module.
Functions§
- accept_
http_ request - Accepts one bounded TCP connection from a listener.
- add_
runtime_ app - Adds an app to a runtime stack while rejecting duplicate app identifiers.
- app_
ops_ backend - Resolves the configured app-ops backend without inventing a default.
- app_
root_ has_ finalized_ artifact - Confirms that a finalized artifact manifest exists below an app root.
- app_
runtime_ conf_ required_ present - Confirms that the app runtime configuration contract is present.
- app_
runtime_ report_ id - Returns the stable app runtime report identifier.
- build_
known_ website - Builds a deterministic known-website descriptor.
- build_
migrate_ operation_ report_ json - Builds a migration report from a resolved app runtime.
- build_
worker_ context - Builds the bounded worker context copied into request workers.
- clamp_
size_ value - Clamps one size to an explicit inclusive range.
- cleanup_
active_ listener - Closes an active listener by consuming its owned handle.
- clear_
listener_ cleanup_ registration - Clears a listener cleanup registration after the listener has been consumed.
- conf_
positive_ size_ value - Returns a positive configured size, bounded to the native worker limits.
- declared_
binary_ targets - Returns the declared binary targets owned by this crate.
- default_
work_ queue_ capacity - Returns the default bounded request queue capacity.
- default_
worker_ count - Returns the default worker count for a runtime configuration.
- detect_
physical_ memory_ bytes - Returns physical memory when an in-process platform provider exposes it.
- emit_
report_ json - Encodes one report value as bounded JSON text.
- emit_
runtime_ path_ helper_ json - Emits a runtime path helper report.
- emit_
text_ file_ to_ stdout - Writes a bounded text file to stdout as a string result.
- emit_
website_ status - Emits website status as a bounded JSON report.
- executable_
dir_ from_ argv0 - Returns the current executable directory for an argv0-style input.
- executable_
path - Returns the path to the launcher binary for a configured executable.
- explicit_
binary_ dir_ override - Returns a validated explicit binary-directory override.
- explicit_
repo_ root_ override - Returns a validated explicit repository-root override.
- export_
relational_ state_ for_ app_ ops - Exports relational state for app operations through the native adapter.
- find_
repo_ root - Finds the repository root containing the canonical app and script directories.
- find_
serve_ handler - Returns whether one argument sequence names a serve handler.
- free_
worker_ context - Releases an owned worker context.
- handle_
app_ or_ runtime_ request - Routes one request to a matched app or framework builtin handler.
- handle_
backup_ restore_ ops_ command - Handles operational commands through validated runtime arguments.
- handle_
deploy_ check_ ops_ command - Handles deploy check ops command.
- handle_
drift_ check_ ops_ command - Handles drift check ops command.
- handle_
framework_ builtin_ request - Handles framework-owned health/version endpoints directly.
- handle_
helper_ command - Handles helper commands without invoking a shell.
- handle_
integrations_ command - Handles the integrations command family through the persisted state report.
- handle_
job_ command - Handles one job command for a persisted state root.
- handle_
jobs_ command - Handles the jobs command family through the persisted state report.
- handle_
migrate_ command - Handles the migration command using the resolved app configuration.
- handle_
noindex_ command - Handles noindex marker creation through the native filesystem implementation.
- handle_
ops_ command - Handles ops command.
- handle_
runtime_ app_ command - Dispatches an app-scoped runtime command.
- handle_
runtime_ command - Dispatches a runtime command against the direct Rust runtime implementation.
- handle_
serve - Dispatches the direct serve boundary for app or shared runtime targets.
- handle_
website_ command - Handles website commands without shell or C fallback behavior.
- http_
parse_ error_ body - Extracts a bounded HTTP error body from a response document.
- http_
parse_ reason_ phrase - Returns a stable HTTP reason phrase for a status code.
- import_
relational_ state_ for_ app_ ops - Imports relational state for app operations through the native adapter.
- install_
signal_ handlers - Installs no process-global signal handlers; callers use explicit shutdown tokens.
- known_
website_ supported - Reports whether a website identifier is one of the supported declarative roots.
- load_
app_ runtime_ for_ single_ app - Loads one app runtime from its packaged artifact directory.
- load_
runtime_ stack - Loads the shared runtime stack through the native runtime loader.
- maybe_
seed_ app_ state - Seeds a missing state file only when the caller explicitly requests seeding.
- option_
value - Returns one exact command-line option value.
- parse_
app_ ops_ config - Parses an app-ops JSON configuration document.
- parse_
positive_ size_ value - Parses a positive size with a safe default and upper bound.
- prepare_
app_ ops - Validates app-ops prerequisites without mutating app state.
- prepare_
finalized_ app_ from_ config - Prepares a finalized app runtime from a resolved app directory and config.
- print_
help - Returns the stable native help text used by the primary launcher.
- print_
version - Returns the package version exposed by the primary launcher.
- process_
single_ stream_ app_ request - Processes one app request using the direct static artifact server.
- process_
single_ stream_ runtime_ request - Processes one shared-runtime request through the selected app stack.
- process_
worker_ context - Writes an explicit process-context report without signal-handler side effects.
- register_
listener_ cleanup - Registers a listener cleanup token with its bound endpoint.
- resolve_
launcher_ binary_ dir - Resolves the directory containing the current Rust launcher binary.
- resolve_
runtime_ socket_ path - Resolves a Unix socket path for a runtime target.
- resolve_
value_ or_ default - Returns a non-empty runtime value or a supplied default.
- resolve_
website_ root - Resolves the website root below a trusted repository root.
- resolved_
work_ queue_ capacity - Resolves a configured queue capacity from the runtime environment.
- resolved_
worker_ count - Resolves a configured worker count from the runtime environment.
- runtime_
app_ directory_ matches_ id - Confirms that an app directory manifest identifies the expected app.
- runtime_
stack_ probe_ ready - Returns whether the shared runtime stack has enough state for readiness.
- runtime_
verb_ supported - Exposes the requested runtime verb set for binary dispatch.
- send_
worker_ pool_ overload_ response - Returns an overload response body without writing unbounded data.
- serve_
static_ file - Serves one validated static request from a packaged artifact root.
- serve_
static_ root - Serves a static root using the bounded direct listener.
- serve_
website_ target - Performs serve website target.
- trace_
wasm_ argv_ if_ requested - Traces argv only when explicitly requested, without interpreting WASI behavior.
- wasi_
single_ stream_ mode_ enabled - Returns whether the WASI guest should process a single request stream.
- wasi_
stdio_ mode_ enabled - Returns whether WASI stdio mode has been explicitly enabled.
- website_
verb_ mode - Returns the stable website mode for a supported website verb.