pub struct MinimalRuntime {}
Implementations§
source§impl MinimalRuntime
impl MinimalRuntime
pub fn default_allocator(&self) -> &'static dyn GlobalAlloc
pub fn exit(&self, code: i32) -> !
pub fn abort(&self) -> !
pub fn pre_main_hook(&self) -> Option<i32>
pub fn post_main_hook(&self)
sourcepub fn runtime_entry(
&self,
rt_info: *const RuntimeInfo,
std_entry: unsafe extern "C-unwind" fn(_: BasicAux) -> BasicReturn,
) -> !
pub fn runtime_entry( &self, rt_info: *const RuntimeInfo, std_entry: unsafe extern "C-unwind" fn(_: BasicAux) -> BasicReturn, ) -> !
Called from _start to initialize the runtime and pass control to the Rust stdlib.
pub fn sysinfo(&self) -> SystemInfo
pub fn get_random(&self, buf: &mut [u8]) -> usize
source§impl MinimalRuntime
impl MinimalRuntime
pub fn get_image_info(&self, id: loaded_image_id) -> Option<loaded_image>
pub fn iterate_phdr(&self, f: &mut dyn FnMut(dl_phdr_info) -> c_int) -> c_int
source§impl MinimalRuntime
impl MinimalRuntime
pub fn open(&self, path: &str) -> Result<RawFd, OpenError>
pub fn read(&self, fd: RawFd, buf: &mut [u8]) -> Result<usize, IoError>
pub fn fd_pread( &self, fd: RawFd, off: Option<u64>, buf: &mut [u8], flags: IoFlags, ) -> Result<usize, IoError>
pub fn fd_pwrite( &self, fd: RawFd, off: Option<u64>, buf: &[u8], flags: IoFlags, ) -> Result<usize, IoError>
pub fn fd_pwritev( &self, fd: RawFd, off: Option<u64>, buf: &[io_vec], flags: IoFlags, ) -> Result<usize, IoError>
pub fn fd_preadv( &self, fd: RawFd, off: Option<u64>, buf: &[io_vec], flags: IoFlags, ) -> Result<usize, IoError>
pub fn fd_get_info(&self, fd: RawFd) -> Option<fd_info>
pub fn write(&self, fd: RawFd, buf: &[u8]) -> Result<usize, IoError>
pub fn close(&self, fd: RawFd) -> Option<()>
pub fn seek(&self, fd: RawFd, pos: SeekFrom) -> Result<usize, IoError>
source§impl MinimalRuntime
impl MinimalRuntime
pub fn map_object( &self, id: ObjID, flags: MapFlags, ) -> Result<ObjectHandle, MapError>
pub fn release_handle(&self, handle: *mut object_handle)
sourcepub fn map_two_objects(
&self,
in_id_a: ObjID,
in_flags_a: MapFlags,
in_id_b: ObjID,
in_flags_b: MapFlags,
) -> Result<(ObjectHandle, ObjectHandle), MapError>
pub fn map_two_objects( &self, in_id_a: ObjID, in_flags_a: MapFlags, in_id_b: ObjID, in_flags_b: MapFlags, ) -> Result<(ObjectHandle, ObjectHandle), MapError>
Map two objects in sequence, useful for executable loading. The default implementation makes no guarantees about ordering.
source§impl MinimalRuntime
impl MinimalRuntime
pub fn available_parallelism(&self) -> NonZeroUsize
pub fn futex_wait( &self, futex: &AtomicU32, expected: u32, timeout: Option<Duration>, ) -> bool
pub fn futex_wake(&self, futex: &AtomicU32, count: usize) -> bool
pub fn spawn(&self, args: ThreadSpawnArgs) -> Result<u32, SpawnError>
pub fn yield_now(&self)
pub fn set_name(&self, _name: &CStr)
pub fn sleep(&self, duration: Duration)
pub fn join(&self, id: u32, timeout: Option<Duration>) -> Result<(), JoinError>
pub fn tls_get_addr(&self, _tls_index: &TlsIndex) -> Option<*mut u8>
source§impl MinimalRuntime
impl MinimalRuntime
pub fn get_monotonic(&self) -> Duration
pub fn actual_monotonicity(&self) -> Monotonicity
pub fn get_system_time(&self) -> Duration
Trait Implementations§
source§impl Default for MinimalRuntime
impl Default for MinimalRuntime
source§fn default() -> MinimalRuntime
fn default() -> MinimalRuntime
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MinimalRuntime
impl ObjSafe for MinimalRuntime
impl RefUnwindSafe for MinimalRuntime
impl Send for MinimalRuntime
impl Sync for MinimalRuntime
impl Unpin for MinimalRuntime
impl UnwindSafe for MinimalRuntime
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more