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:
33
include/nyrt.h
Normal file
33
include/nyrt.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef NYRT_H
|
||||
#define NYRT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Phase 20.36/20.37: C‑ABI 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 process‑like 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
|
||||
|
||||
Reference in New Issue
Block a user