// Hypervisor.framework exists only in native macOS builds (host/hvf.c). // The JavaScript lane registers stubs that fail, so `bend host/*.bend` still // checks and runs anywhere, and reports that it needs the native build. function hvf_unavailable() { return 4294967295; } io_eff(CID(Hvf.init), () => 1); io_eff(CID(Hvf.load), hvf_unavailable); io_eff(CID(Hvf.write), hvf_unavailable); io_eff(CID(Hvf.read), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.vcpu), () => ({ $: CID(Con), head: 4294967295, tail: { $: CID(Nil) } })); io_eff(CID(Hvf.irq), hvf_unavailable); io_eff(CID(Hvf.kick), hvf_unavailable); io_eff(CID(Hvf.arch), () => 0); io_eff(CID(Hvf.x86_setup), hvf_unavailable); io_eff(CID(Hvf.x86_boot), hvf_unavailable); io_eff(CID(Hvf.x86_pio_put), hvf_unavailable); io_eff(CID(Hvf.x86_pio_get), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.out), hvf_unavailable); io_eff(CID(Hvf.stdin), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.random), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.disk_open_with), hvf_unavailable); io_eff(CID(Hvf.disk_err), () => 0); io_eff(CID(Hvf.disk_status), hvf_unavailable); io_eff(CID(Hvf.signal_wait), hvf_unavailable); io_eff(CID(Hvf.signals), () => 0); io_eff(CID(Hvf.accept_retry), () => 0); io_eff(CID(Hvf.disk_size), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.disk_read), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.disk_write), hvf_unavailable); io_eff(CID(Hvf.disk_copy), hvf_unavailable); io_eff(CID(Hvf.tcp_fill), () => 0); io_eff(CID(Hvf.net_copy), hvf_unavailable); io_eff(CID(Hvf.stage), hvf_unavailable); io_eff(CID(Hvf.disk_short), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.disk_mark), () => 0); io_eff(CID(Hvf.zero_ram), hvf_unavailable); io_eff(CID(Hvf.disk_alloc), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.disk_xcopy), hvf_unavailable); io_eff(CID(Hvf.inflate_ram), hvf_unavailable); io_eff(CID(Hvf.inflate_disk), hvf_unavailable); io_eff(CID(Hvf.stage_drop), hvf_unavailable); io_eff(CID(Hvf.tcp_send_staged), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.file_size), hvf_unavailable); io_eff(CID(Hvf.stdin_wait), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.stdin_tty), () => 0); io_eff(CID(Hvf.set_dns), () => 0); io_eff(CID(Hvf.set_args), () => 0); io_eff(CID(Hvf.net_holds), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.tcp_release), () => 0); io_eff(CID(Hvf.dns), () => 16843009); io_eff(CID(Hvf.disk_flush), hvf_unavailable); io_eff(CID(Hvf.now), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.reexec), hvf_unavailable); io_eff(CID(Hvf.exe_path), () => ""); io_eff(CID(Hvf.set_exec), () => 0); io_eff(CID(Hvf.disk_discard), () => 0); io_eff(CID(Hvf.ram_release), () => 0); io_eff(CID(Hvf.disk_space), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.disk_set_hint), () => 0); io_eff(CID(Hvf.disk_zero), hvf_unavailable); io_eff(CID(Hvf.disk_zero_keep), hvf_unavailable); io_eff(CID(Hvf.ctl_call), () => ({ $: CID(Con), head: 1, tail: { $: CID(Con), head: 2, tail: { $: CID(Nil) } } })); io_eff(CID(Hvf.ls), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.rmdir), hvf_unavailable); io_eff(CID(Hvf.size_kib), () => 0); io_eff(CID(Hvf.args), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.clone), hvf_unavailable); io_eff(CID(Hvf.remove), hvf_unavailable); io_eff(CID(Hvf.out_limits), () => 0); io_eff(CID(Hvf.tty_mode), () => 0); io_eff(CID(Hvf.sock_path_max), () => 103); io_eff(CID(Hvf.vcpu_queue), hvf_unavailable); io_eff(CID(Hvf.tcp_connect), hvf_unavailable); io_eff(CID(Hvf.tcp_wait), hvf_unavailable); io_eff(CID(Hvf.tcp_recv), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.tcp_shutdown), hvf_unavailable); io_eff(CID(Hvf.nat_send), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.tcp_flush), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.tcp_flush_act), () => 0); io_eff(CID(Hvf.tcp_over), () => 0); io_eff(CID(Hvf.udp_ages), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.udp_close), () => 0); io_eff(CID(Hvf.share_quota), () => 0); io_eff(CID(Hvf.console_log), hvf_unavailable); io_eff(CID(Hvf.console_size), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.console_reopen), () => 0); io_eff(CID(Hvf.share_usage), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.tcp_close), hvf_unavailable); io_eff(CID(Hvf.tcp_abort), hvf_unavailable); io_eff(CID(Hvf.udp_send), hvf_unavailable); io_eff(CID(Hvf.udp_flows), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.fdc_stamps), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.fdc_put), () => 0); io_eff(CID(Hvf.udp_recv), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.share_open), hvf_unavailable); io_eff(CID(Hvf.fs), () => ({ $: CID(Con), head: 1, tail: { $: CID(Con), head: 78, tail: { $: CID(Nil) } } })); io_eff(CID(Hvf.pause), hvf_unavailable); io_eff(CID(Hvf.resume), hvf_unavailable); io_eff(CID(Hvf.exit_counts), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.pause_state), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.snap_save), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.snap_commit), hvf_unavailable); io_eff(CID(Hvf.snap_rebase), hvf_unavailable); io_eff(CID(Hvf.tick_wait), hvf_unavailable); io_eff(CID(Hvf.ram_kib), () => 0); io_eff(CID(Hvf.ram_settle), () => 4294967295); io_eff(CID(Hvf.snap_drop), hvf_unavailable); io_eff(CID(Hvf.rename), hvf_unavailable); io_eff(CID(Hvf.net_limits), () => 0); io_eff(CID(Hvf.snap_plans), () => 0); io_eff(CID(Hvf.set_prog), () => 0); io_eff(CID(Hvf.lan_open), hvf_unavailable); io_eff(CID(Hvf.lan_send), () => 0); io_eff(CID(Hvf.lan_recv), hvf_unavailable); io_eff(CID(Hvf.lan_to_ram), () => 0); io_eff(CID(Hvf.lan_release), () => 0); io_eff(CID(Hvf.prog), () => 1); io_eff(CID(Hvf.snap_peek), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.snap_load), hvf_unavailable); io_eff(CID(Hvf.snap_open), () => ({ $: CID(Con), head: 4294967295, tail: { $: CID(Nil) } })); io_eff(CID(Hvf.snap_info), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.snap_args), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.snap_machine), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.snap_gic), hvf_unavailable); io_eff(CID(Hvf.ctl_listen), hvf_unavailable); io_eff(CID(Hvf.ctl_next), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.ctl_reply), hvf_unavailable); io_eff(CID(Hvf.unix_connect), hvf_unavailable); io_eff(CID(Hvf.vsock_listen), hvf_unavailable); io_eff(CID(Hvf.vsock_accept), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.vsock_base), () => ""); io_eff(CID(Hvf.fwd_listen), hvf_unavailable); io_eff(CID(Hvf.fwd_accept), hvf_unavailable); io_eff(CID(Hvf.err_text), () => "unavailable"); io_eff(CID(Hvf.fb_init), () => 1); io_eff(CID(Hvf.fb_dump), hvf_unavailable); io_eff(CID(Hvf.sock_facts), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.sock_remove), hvf_unavailable); io_eff(CID(Hvf.mkdir), hvf_unavailable); io_eff(CID(Hvf.dir_facts), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.fb_present), (w) => io_tup(w, { $: CID(Nil) })); io_eff(CID(Hvf.fw_load), hvf_unavailable); io_eff(CID(Hvf.flash), () => 0); io_eff(CID(Hvf.out_flush), () => 0); io_eff(CID(Hvf.log_state), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.log_put), () => 0); io_eff(CID(Hvf.nofile), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.set_nofile), () => 1024); io_eff(CID(Hvf.tcp_close_facts), () => ({ $: CID(Nil) })); io_eff(CID(Hvf.vsock_file), hvf_unavailable); io_eff(CID(Hvf.fd_room), () => 0);