Unless GraalJS adds support for moving JS objects between states, this is difficult to do well. Current __internals.callForeign just disallows them, but that is not going to work for a public API. JSON serialization is a possible solution, but would probably be quite slow.
Unless GraalJS adds support for moving JS objects between states, this is difficult to do well. Current __internals.callForeign just disallows them, but that is not going to work for a public API. JSON serialization is a possible solution, but would probably be quite slow.