(s: &str)
| 163 | } |
| 164 | |
| 165 | pub(super) unsafe fn write_out(s: &str) -> usize { |
| 166 | let b = s.as_bytes(); |
| 167 | let n = b.len().min(SZ); |
| 168 | with_runtime(|rt| rt.out[..n].copy_from_slice(&b[..n])); |
| 169 | n |
| 170 | } |
| 171 | |
| 172 | /* `dispatch_*` prologue: resolve `recv_h` and run `f` against the live VM. Fails on stale handle or call outside `run()`. */ |
| 173 | pub(super) fn with_recv<F>(invalid_recv_msg: &'static str, recv_h: u32, f: F) -> Result<Val, VmErr> |
no test coverage detected