Remix.run Logo
We Rebuilt the Linux MicroVM Stack on Apple Silicon(encore.dev)
64 points by signa11 3 hours ago | 30 comments
dolmen 44 minutes ago | parent | next [-]

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 37 minutes ago | parent | next [-]

I thought it was just me. Super weird.

klausa 19 minutes ago | parent | prev | next [-]

Wow, that's actually an impressive new failure mode; and it happens on Safari too.

andout_ 11 minutes ago | parent | prev [-]

Sorry about that - just pushed a fix :)

pranav_tech26 6 minutes ago | parent | prev | next [-]

Rebuilding MicroVMs natively on Apple Silicon usually cuts virtualization overhead massively, but Hypervisor.framework DX and virtio device parity are the real bottlenecks.

jiqiren 27 minutes ago | parent | prev | next [-]

"You can even get /dev/kvm inside a Linux VM on an M3 or later running macOS 15, which runs Firecracker unmodified."

I'm very confused why any SWE is on a M1 or M2 Mac. I've always gotten a new machine at $CORP every 2 years...

isodev 12 minutes ago | parent | next [-]

Because prices? Have you seen how much Apple products cost these days?

Also, M1/M2 are perfectly fine and capable hardware. It's hard to justify the upgrade outside some artificial constraints Apple would bring in with a macOS update.

twalla 9 minutes ago | parent | prev | next [-]

You’d be surprised. I got an absolute boat anchor of a 2019 MacBook when I started a job in early 2022. I requested a new one in late 2023 because company policy is to refresh laptops every 4 years - whoever was on the other end of my support ticket interpreted the policy as four years from issuance and denied me.

jml78 17 minutes ago | parent | prev | next [-]

I am on an M1 macbook pro. My company will upgrade me anytime I want.

I haven’t asked because my current laptop is more than ok.

jonathanlydall 20 minutes ago | parent | prev | next [-]

I'm very surprised you feel it's a given that every SWE at every company has the perk of getting a new machine as quickly as every 2 years, I doubt it's justified by the productivity increases of just 2 years of hardware improvements.

dijit 21 minutes ago | parent | prev | next [-]

it's pretty common to be running a 4 year old computer in most companies I've worked.

I think they plan for 3 years but in reality it becomes closer to 4 (because they don't plan the refresh during the actual hardware refresh cycle, so you'll end up with a computer that was released in September the year before in like August the year after).

I've never worked anywhere that replaced my computer after 2 years.

nxc18 15 minutes ago | parent | prev [-]

Things were painful in the Intel era but I’m on M1 Mac and I’d have a really hard time justifying a request for an upgrade. I absolutely detested my old Intel MacBook (touchbar era) and couldn’t wait to get rid of it.

I run bloated slow electron apps and chrome all day, generally with profligate usage patterns, and things hardly ever slow down even with corporate antimalware. Sometimes I forget about having left Windows VMs running in the background.

Anyway, why would my company spend $2500+ every two years to turn instant into instant?

bittermandel 38 minutes ago | parent | prev | next [-]

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.

huerne 2 hours ago | parent | prev | next [-]

VZ.framework is very limited, Hypervisor.framework is the better analogue to KVM

jdub an hour ago | parent [-]

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.)

kombine 2 hours ago | parent | prev | next [-]

> most engineers at Encore develop on a Mac

They are solving the wrong problem.

UqWBcuFx6NV4r an hour ago | parent | next [-]

Hacker News is so utterly detached from reality at times, and comments like these really drive that home.

mathisfun123 23 minutes ago | parent [-]

Most tech people are utterly detached from reality so that definitely tracks

rob_c an hour ago | parent | prev [-]

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 an hour ago | parent | next [-]

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 an hour ago | parent | next [-]

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.

dijit 20 minutes ago | parent | next [-]

If you have a business relationship with Apple, it's same-day service.

You don't even have to be a large corp for that, my org was 60 people with like 20 Macbooks and we had it.

FWIW if you live in a major metro area, Dell also does this, it's not terribly uncommon for business class machines.

superb_dev 29 minutes ago | parent | prev [-]

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 an hour ago | parent | prev [-]

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.

asdf88990 an hour ago | parent | prev | next [-]

Lots of Lenavo laptops do just fine, but Apple hardware is still supreme for what it is worth.

MadsRC an hour ago | parent | prev [-]

FleetDM comes to mind

andout_ 28 minutes ago | parent | prev | next [-]

Hey everyone - author of the article here! Happy to take questions.

techpression 38 minutes ago | parent | prev | next [-]

I think Encore is great and do really cool things, but this post is AI;DR from the first sentence.

bit_rot73 an hour ago | parent | prev | next [-]

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 2 hours ago | parent | prev [-]

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.