pub trait NativeEntryTable {
// Required methods
fn program_bytes(&self) -> &[u8] ⓘ;
fn invoke(
&self,
module_id: u32,
function_id: u32,
frame: &mut ShadowFrame,
out: &mut Completion,
) -> Result<CompletionTag, AbiError>;
}Expand description
A non-self-referential seam for invoking a compiled native entry by its
(module_id, function_id) identity. A JIT backend implements this over its
JITModule; a linked AOT image (LinkedProgram) implements it over its
unit table. The runtime engine stores &dyn NativeEntryTable and routes
nested CreateClosure re-entry through it.
Required Methods§
Sourcefn program_bytes(&self) -> &[u8] ⓘ
fn program_bytes(&self) -> &[u8] ⓘ
The exact canonical [bamts_bytecode::Program::encode] bytes compiled into these entries.
Callers must compare these bytes with the supplied program before any native entry runs.
Sourcefn invoke(
&self,
module_id: u32,
function_id: u32,
frame: &mut ShadowFrame,
out: &mut Completion,
) -> Result<CompletionTag, AbiError>
fn invoke( &self, module_id: u32, function_id: u32, frame: &mut ShadowFrame, out: &mut Completion, ) -> Result<CompletionTag, AbiError>
Invokes the entry for (module_id, function_id), returning its completion tag.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".