vm(hako): add v1 reader/dispatcher (flagged), commonize mir_call handler, share block scan; smokes: add v1 hakovm canary; docs: 20.37/20.38 plans, OOB policy; runner: v1 hakovm toggle; include SKIP summary

This commit is contained in:
nyash-codex
2025-11-03 23:21:48 +09:00
parent a4f30ae827
commit 06a729ff40
67 changed files with 3340 additions and 1520 deletions

33
include/nyrt.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef NYRT_H
#define NYRT_H
#ifdef __cplusplus
extern "C" {
#endif
// Phase 20.36/20.37: CABI scaffold (PoC)
// Minimal kernel API for Rust runtime; subject to evolution.
// Initialize NyRT kernel. Returns 0 on success.
int nyrt_init(void);
// Tear down NyRT kernel.
void nyrt_teardown(void);
// Load MIR(JSON v1) text. Returns a handle (>=1) or 0 on error.
unsigned long nyrt_load_mir_json(const char* json_text);
// Execute main() of the loaded module. Returns processlike rc (0..255).
int nyrt_exec_main(unsigned long module_handle);
// Hostcall bridge (name = "env.*" / provider). Returns 0 on success.
int nyrt_hostcall(const char* name, const char* method,
const char* payload_json,
/*out*/ char* out_buf, unsigned int out_buf_len);
#ifdef __cplusplus
}
#endif
#endif // NYRT_H