Hi, this is my recent work of several months of Agentic Engineering.
So the background of this is I like building toolings / compiler, but never had the time since I run startups. So since the coding AI becoming better I started to build something that I for a long time wanted to build: own vm / runtime
So, the problem I want to solve is that I like Typescript and I like go-lang concurrency model, and there is no attempt building typescript-like runtime so I give it a shot.
It is using reactor model with io thread-pool and worker-threadpool, Stack based VM, thin task model with small initial stack like go.
The Idea is all execution is task, whenever a task is run, it will run until suspension point (channel, io, sleep, etc) no task can run more than 10 ms, it will be preempted at safepoint. I try to make task switching as cheap as possible
For JIT and AOT I use cranelift to generate machine code from SSA. I use prewarming using compile time heuristic and JIT hotpath profiling. It support also AOT. I make so that native code also follow the task model so it has safepoint, suspendable and preemptible.
Still early. Happy to hear feedback.