Skip to main content

Module platform

Module platform 

Source
Expand description

Provides the platform module.

§Examples

ⓘ
use pharos_native::platform;
  • crate::runtime for runtime logic that branches on platform behavior.

Structs§

PlatformBuffer
Public struct PlatformBuffer used by this module.
TargetConstraint
Public struct TargetConstraint used by this module.

Enums§

HostTarget
Public enum HostTarget used by this module.

Constants§

MACOS_CONSTRAINTS 🔒
MODULE_STATUS
Public constant MODULE_STATUS exposed by this module.
PLATFORM_BUFFER_LIMIT 🔒
TARGET_CONSTRAINTS
Public constant TARGET_CONSTRAINTS exposed by this module.
WASI_P1_CONSTRAINTS 🔒
WASM_WEB_CONSTRAINTS 🔒

Functions§

__acrt_initialize
Performs acrt initialize.
__acrt_thread_attach
Performs acrt thread attach.
__acrt_thread_detach
Performs acrt thread detach.
__acrt_uninitialize
Performs acrt uninitialize.
__acrt_uninitialize_critical
Performs acrt uninitialize critical.
__vcrt_initialize
Performs vcrt initialize.
__vcrt_thread_attach
Performs vcrt thread attach.
__vcrt_thread_detach
Performs vcrt thread detach.
__vcrt_uninitialize
Performs vcrt uninitialize.
__vcrt_uninitialize_critical
Performs vcrt uninitialize critical.
_is_c_termination_complete
Performs is c termination complete.
buffer_append
Appends bytes to a platform buffer.
buffer_free
Releases a platform buffer.
buffer_init
Initializes a bounded platform buffer.
buffer_reserve
Reserves bounded capacity for a platform buffer.
dup_range
Duplicates a bounded byte range as UTF-8 text.
path_dirname
Returns a path’s parent component as owned text.
path_exists
Checks whether a path exists without following user-controlled commands.
path_is_directory
Returns whether a path currently identifies a directory.
path_is_writable
Checks writability without creating files or invoking external commands.
path_join
Joins two paths without allowing an absolute right-hand replacement.
read_file_text
Reads a bounded UTF-8 file.
starts_with
Tests whether one string begins with another string.
target_constraints
Performs target constraints.
trim_in_place
Trims ASCII whitespace in place.