Closed kabiroberai closed 10 months ago
napi-rs has done this well. Automated TypeScript bindings would be nice too.
Ideally we would just write Swift code normally without thinking of bridging and have the preprocessor bridge to JS with near-zero boilerplate.
Implemented via macros 🎉
Using a preprocessor could vastly improve ergonomics, for example by removing the need to manually declare
NodeClass.properties
. The preprocessor should generate an auxiliary source file as seen in theos/orion, and can be built as an SPM package plugin or integrated into the JS builder.