1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # tatara-vm — Darwin-hosted Linux guests for tatara-os
//!
//! Typed `VmSpec` authored in tatara-lisp, emitted as config for whichever
//! hypervisor the host has available:
//!
//! - **`vfkit`** — Apple Virtualization.framework, minimal CLI, JSON config.
//! Default on Darwin. Installed via nixpkgs' `vfkit` attribute.
//! - **`qemu`** — portable fallback; KVM on Linux, HVF on Darwin (intel).
//! - **`kasou`** — pleme-io's own Virtualization.framework wrapper. Used when
//! we want Rust-native control, no CLI shell-out.
//!
//! The Nix story: the VM's **kernel** + **initrd** + **rootfs** are tatara
//! `Derivation` values. That means every guest is content-addressed, and two
//! identical `VmSpec` values produce the same bytes in `/nix/store`. Darwin
//! hosts the hypervisor; Nix (on Darwin) builds every guest artifact.
//!
//! Lisp authoring:
//!
//! ```lisp
//! (defvm plex-guest
//! :cpus 4
//! :memory-mib 4096
//! :hypervisor (:kind Vfkit)
//! :kernel (:bridge "linuxPackages.kernel")
//! :initrd (:bridge "tatara.initrd")
//! :rootfs (:system plex)
//! :network ((:kind Nat :subnet "10.200.0.0/24"))
//! :shares ((:host "/Users/drzzln/code" :guest "/mnt/code"))
//! :cmdline ("console=hvc0" "init=/bin/tatara-init"))
//! ```
// `maquina` is ENTIRELY a projection onto `maquina_engine::VmShape`, so it
// cannot exist without the optional dependency. It was declared unconditionally
// while `maquina-engine` is `optional = true`, which is why the default build
// failed with E0432 `unresolved import maquina_engine` — the module compiled,
// the crate was never linked. Gated to match the dependency that defines it.
pub use ;
pub use ;
pub use DarwinRootfs;
pub use ;
pub use ;
pub use ;
pub use ;