Phase 25.1a: selfhost builder hotfix (fn rename, docs)

This commit is contained in:
nyash-codex
2025-11-15 05:42:32 +09:00
parent 8d9bbc40bd
commit 6856922374
40 changed files with 2013 additions and 72 deletions

View File

@ -13,14 +13,27 @@ extern "C" {
pub fn core_probe_invoke(target: &str, method: &str, argc: i32) -> i32 {
let t = std::ffi::CString::new(target).unwrap_or_else(|_| std::ffi::CString::new("?").unwrap());
let m = std::ffi::CString::new(method).unwrap_or_else(|_| std::ffi::CString::new("?").unwrap());
unsafe { ny_core_probe_invoke(t.as_ptr() as *const u8, m.as_ptr() as *const u8, argc as c_int) as i32 }
unsafe {
ny_core_probe_invoke(
t.as_ptr() as *const u8,
m.as_ptr() as *const u8,
argc as c_int,
) as i32
}
}
/// MapBox.set stub (design-stage): returns 0 on success
pub fn core_map_set(type_id: i32, instance_id: u32, key: &str, val: &str) -> i32 {
let k = std::ffi::CString::new(key).unwrap_or_else(|_| std::ffi::CString::new("").unwrap());
let v = std::ffi::CString::new(val).unwrap_or_else(|_| std::ffi::CString::new("").unwrap());
unsafe { ny_core_map_set(type_id as i32, instance_id as u32, k.as_ptr() as *const u8, v.as_ptr() as *const u8) as i32 }
unsafe {
ny_core_map_set(
type_id as i32,
instance_id as u32,
k.as_ptr() as *const u8,
v.as_ptr() as *const u8,
) as i32
}
}
/// ArrayBox.push stub (design-stage): returns 0 on success