MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / register_code_module

Function register_code_module

compiler/src/main/exports.rs:51–55  ·  view source on GitHub ↗
(spec_ptr: *const u8, spec_len: u32, src_ptr: *const u8, src_len: u32)

Source from the content-addressed store, hash-verified

49
50#[unsafe(no_mangle)]
51pub unsafe extern "C" fn register_code_module(spec_ptr: *const u8, spec_len: u32, src_ptr: *const u8, src_len: u32) {
52 let spec = unsafe { safe_str_owned(spec_ptr, spec_len) };
53 let src = unsafe { safe_str_owned(src_ptr, src_len) };
54 with_runtime(|rt| rt.registry.push((spec, ModuleEntry::Code(src))));
55}
56
57#[unsafe(no_mangle)]
58pub unsafe extern "C" fn register_native_module(spec_ptr: *const u8, spec_len: u32, names_ptr: *const u8, names_len: u32, base_id: u32) {

Callers

nothing calls this directly

Calls 3

safe_str_ownedFunction · 0.85
with_runtimeFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected