for those who dont know, crostini is a feature available for chromeos that lets you install a debian container and has a cute terminal and lets you install linux software (can be from flathub, github, etc!!! woa!!). i love it so much and use it daily for programming python on my chromebook and crostini is what i mean when i say that google loves open source and linux, they know debian is the greatest and they use gentoo to make chromeos

  • Quack Doc@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    7 months ago

    crostini is pretty damn great but it’s important to know what it IS and it’s actually really simple. Crostini is two things combined into one

    Firstly A VMM

    Crostini uses the crosvm VMM which is can be thought of kinda like an inhouse version of qemu but designed to explicitly run natively integrated and high performance VMs safely instead of being a swiss army knife (KVM acceleration, virtio peripherals etc) (PS. it’s written in rust too) They use it for chromeOS to integrate android support (on select newer devices) and linux. It runs a supervisor distro which can run containers inside of it.

    ChromeOS calls the VM termina. Im not sure what distro is running in the VM, or if its a specialized one. I forget

    Next is the containerization

    It is a lot like distrobox, It can run a myriad of distros but the key part of it is sommelier. A wayland compositor designed to render windows through virtio-wayland, an extension of virtio-gpu. In practice very similar waypipe which rendering wayland windows to a remote wayland client using network/sockets (Yes, it does support AV_VSOCK so it can work with qemu.)

    Sommelier is run in the containerized Distro, running on the TerminaVM. Using termina provides excelent security and performance, and then using LXD inside of termina provides excellent flexibility

    The guts of “crostini” crosvm, virtio-wayland, sommelieris all open source, you can actually (with some degree of hassle) set this up entirely yourself, or do what I do, and run qemu + waypipe for a similar experience. Waypipe is much easier to setup however it comes at a preformance detriment since qemu virtio-gpu perf is worse then crosvm (no vulkan support in qemu yet still)

    EDIT: s/Architecturally/in practice/ I have no idea why I said Architecturally. they are quite different things. I must have had a brain fart