AST processing plugin system.
Designed as a general crate, to support using it from other libraries too. This depends on the abi_stable crate.
I (kdy1) wants to pass the AST data to plugin without having to change the type of AST nodes.
Instead, we just use proc-macro to convert ast into something that can be passed directly to the plugin, using StableAbi. In plugin, we convert it back to normal AST before processing, so the plugin authors can use exactly same code as core transforms. Of course, this is slow, but it’s only slow if it’s compared to the changing type. It’s much faster than serializing/deserializing.
In short, we do
Normal AST -> Plugin AST -> Normal AST -> plugin -> Normal AST -> Plugin AST -> Normal AST
Currently this crate depends on
swc_common, but if there’s a request, I
can change it to not depend on
Implemented by AST nodes that has stable ABI, and passable to plugin.