Skip to content

Isolate runtime state for independent Truffle engines - #8

Open
Sam Gammon (sgammon) wants to merge 1 commit into
mainfrom
feature/independent-engine-runtime
Open

Sam Gammon (sgammon) wants to merge 1 commit into
mainfrom
feature/independent-engine-runtime

Conversation

@sgammon

@sgammon Sam Gammon (sgammon) commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Pkl standard-library modules and several builtin ASTs currently live in process-wide singletons. Using them across independent Truffle engines can fail with invalid AST sharing. Move that state into the owning language instance so each engine can initialize and reuse its own standard library.

This also isolates bootstrap inputs and thread-local type-checking state, creates factory members per language instance, and removes cached prototypes and type nodes that cross engine boundaries. The legacy Evaluator continues to reuse its internal engine.

Stack: 1 of 2, based on main. Dependent PR #9 adds the public polyglot entry points and independent-engine integration tests.

Validation: full existing pkl-core test suite and Javadoc generation. Native-image builds and performance benchmarks have not been run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant