You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plan is to split the monolithic Engine into many smaller components:
There'll be a new Engine that only contains an Environment. It will be used for compiling Scripts.
Scripts will no longer hold a mutable reference to the engine, and instead will use a unique ID assigned to the engine at its creation to ensure correctness.
Engines will also be used for creating Isolates, which will be the actual execution environments.
An Isolate is like a reusable replacement for a Fiber, except as the name suggests - it's completely isolated from other isolates. Each isolate has its own GC and global storage.
Scripts will no longer be able to write global variables, only read from them. Global variable shadowing will also not be allowed.
I'm also considering making global variables be part of the Engine, because hey they're immutable anyways. But we'll see how that goes.
In addition there will also be a Registry type - a dynamically typed storage container, basically a HashMap<TypeId, RefCell<Box<dyn Any>>>.
There will be two registries: the static registry (part of the Engine,) and the isolate registry (one per Isolate). Foreign functions will have a way of accessing these registries and mutating what's inside them.
This mechanism will be modeled to fit the requirements for implementing require.
The text was updated successfully, but these errors were encountered:
aka. decoupling stuff into smaller parts.
The plan is to split the monolithic
Engine
into many smaller components:Engine
that only contains anEnvironment
. It will be used for compilingScript
s.Engine
s will also be used for creatingIsolate
s, which will be the actual execution environments.Isolate
is like a reusable replacement for aFiber
, except as the name suggests - it's completely isolated from other isolates. Each isolate has its own GC and global storage.Engine
, because hey they're immutable anyways. But we'll see how that goes.Registry
type - a dynamically typed storage container, basically aHashMap<TypeId, RefCell<Box<dyn Any>>>
.Engine
,) and the isolate registry (one perIsolate
). Foreign functions will have a way of accessing these registries and mutating what's inside them.require
.The text was updated successfully, but these errors were encountered: