We Rebuilt the Linux MicroVM Stack on Apple Silicon

(encore.dev)

54 points | by signa11 2 hours ago

8 comments

  • andout_ 1 minute ago
    Hey everyone - author of the article here! Happy to take questions.
  • dolmen 17 minutes ago
    What an awful blog renderer that, in Firefox, works when scrolling with the trackpad, but doesn't work when using keyboard arrow keys or pageUp/down: I get blank pages when scrolling with the keyboard beyond the initial viewport.
    • bartvk 10 minutes ago
      I thought it was just me. Super weird.
  • bittermandel 11 minutes ago
    By experience, getting Firecracker to run well on M-series macs is quite the undertaking. I'm not at all surprised Encore decided to take this path considering their customer base!

    At Lovable we decided to spend ~1 engineering month getting our sandbox infrastructure to be 100% runnable on Mac and on Linux with predictable builds using Bazel etc.

    But we actively decided to take a different route than Encore and run nested virtualization, which on macOS means vfkit -> QEMU -> Kind + Firecracker vm(s). It's been invaluable to get the same development and testing tools on both platforms tbh.

  • kombine 1 hour ago
    > most engineers at Encore develop on a Mac

    They are solving the wrong problem.

    • UqWBcuFx6NV4r 20 minutes ago
      Hacker News is so utterly detached from reality at times, and comments like these really drive that home.
    • rob_c 42 minutes ago
      No, they're realists.

      Plus show me an off the shelf solution to MDM that exists in the Linux space? (Not too mention an easy to buy consumer devices which supports suspend/resume correctly in 2026, not even Windows can do that any more)

      Apple is crap and evil about many things, but at least here they know their paying audience...

      • mhast 33 minutes ago
        One case where Apple can be very useful is if you're traveling a lot for work.

        Wherever you are you can probably find a local store that sells and services Macbooks. So if your machine is damaged during a trip you can get it fixed, or buy a replacement on the spot, and at least get through the work you are there to do.

        For small-ish companies that can be a very useful feature.

        • elAhmo 23 minutes ago
          Buying on the spot - sure. Anything that requires repair has to be usually booked in advance with some waiting time. Relatively short, usually days, but still not really possible to go into the store and get your laptop fixed right away in most cases.
          • superb_dev 2 minutes ago
            The wait can be pretty short, I once got the charging port on my iPhone replaced same day at an Apple Store in Vegas
        • ErroneousBosh 19 minutes ago
          Why wouldn't you do that with any other platform?

          Buy any laptop, stick Linux on it, get working.

          Buy a cheap shitty Chromebook, ssh to your dev platform, give it to some school child who doesn't have a laptop when you get your real one back.

          You don't need to be locked into Apple's ecosystem for that.

      • MadsRC 22 minutes ago
        FleetDM comes to mind
      • asdf88990 32 minutes ago
        Lots of Lenavo laptops do just fine, but Apple hardware is still supreme for what it is worth.
  • huerne 1 hour ago
    VZ.framework is very limited, Hypervisor.framework is the better analogue to KVM
    • jdub 54 minutes ago
      Virtualization.framework isn't particularly limited, for what it is... given they're using Firecracker on Linux, it makes sense to use a similarly high level API on macOS.

      (One could add a Hypervisor.framework backend to Firecracker, though I'd be surprised if AWS accepted it.)

  • techpression 10 minutes ago
    I think Encore is great and do really cool things, but this post is IA;DR from the first sentence.
  • bit_rot73 52 minutes ago
    Four years on a shared remote machine before building the local backend is a good lesson in when to invest in dev tooling versus living with the workaround.
  • github_vibe 1 hour ago
    I just encountered the `com.apple.private.virtualization` entitlement limitation just last night, wanting to use VZVirtualMachine private AccessorEndpoint api. There's lot of useful stuff hidden in Apple's Private API space.

    Great write up! I enjoy seeing others working in the same problem space.