Overview¶
polyglot-adapter is a runtime adapter for dynamic languages built on top of the GraalVM Polyglot API.
Note This project wraps the GraalVM Polyglot API to simplify runtime integration. It does not replace GraalVM or introduce a separate execution runtime.
It should be understood as:
- an adapter API extending the GraalVM Polyglot API
- a runtime adapter for Java applications
- a lightweight wrapper for guest-language execution
- a GraalVM polyglot integration layer
Instead of having every application work directly with low-level Context and Value calls, the adapter adds a higher-level runtime model:
- Java interfaces define the contract visible to application code
ScriptSourceabstracts where scripts come fromPyExecutorandJsExecutorimplement convention-based binding- the Spring Boot starter turns those executors into injectable clients
- the code generation tooling produces Java interfaces from Python contracts
Problem It Solves¶
The raw GraalVM Polyglot API is powerful, but once an application grows beyond a simple script call it usually needs additional structure around:
- loading scripts from classpath, filesystem, or packaged resources
- keeping Java contract names aligned with dynamic-language exports
- validating bindings at startup
- converting repeated
Valuelookups into maintainable Java APIs - integrating polyglot execution into Spring applications
polyglot-adapter addresses those problems without replacing GraalVM. It remains a thin runtime adapter on top of the GraalVM Polyglot API.
Repository Layout¶
The repository is organized into three logical layers:
api: shared annotations and model typesruntime: adapter execution, Spring integration, and dependency managementbuild-tools: static analysis and code generation
See: