Bun is based on JavaScriptCore, with a number of niceties built-in. It's written in Zig, so perhaps it's possible?
I've been doing some reading on the subject and found what I think are some related topics, but some of this is over my head ATM:
- Swift binary with embedded runtime and standard library?
- Integrating Zig and SwiftUI – Mitchell Hashimoto
- https://github.com/oven-sh/bun/blob/main/src/bun.js/bindings/headers.h
I'm working on a server-side Swift project that will run on Mac and Linux.