← Back to context

Comment by storystarling

17 days ago

Isolated state is definitely the right call. I am curious how you implemented the shared memory primitives though. Usually that is where the complexity creeps back in if you want to avoid global locks. How do you expose that without forcing the host to manage its own synchronization?

We don’t expose shared mutability to VMs. The trick is: publish‑as‑immutable plus adoption via ports. Ports/queues do the synchronization; fun_shared_buffer is off‑heap and refcounted with atomic ops. The host doesn’t need to lock anything for the common paths.