Cargo Features

[dependencies]
swc_plugin_runner = { version = "5.0.0", default-features = false, features = ["plugin_transform_host_js", "plugin_transform_host_native", "plugin_transform_host_native_shared_runtime", "filesystem_cache", "plugin_transform_schema_v1", "plugin_transform_schema_vtest", "ecma", "css", "rkyv-impl"] }
default = filesystem_cache, plugin_transform_host_native

These default features are set whenever swc_plugin_runner is added without default-features = false somewhere in the dependency tree.

plugin_transform_host_js

Enables js-default of wasmer, wasm of wasmer-compiler-cranelift, js-default of wasmer-wasix ^0.31.0

plugin_transform_host_native default

Enables wasmer and wasmer-compiler-cranelift, host-fs, host-threads, logging, sys, sys-poll and sys-thread of wasmer-wasix ^0.31.0

plugin_transform_host_native_shared_runtime = tokio
filesystem_cache default = wasmer-cache

Supports a cache allow to store compiled bytecode into filesystem location.
This feature implies in-memory cache support. This is not supported on wasm32 target.

plugin_transform_schema_v1

Enables plugin_transform_schema_v1 of swc_common

plugin_transform_schema_vtest

Enables plugin_transform_schema_vtest of swc_common

ecma

Enable ECMASCript support

Enables rkyv-impl of swc_ecma_ast

css

Enable CSS support

Enables rkyv-impl of swc_css_ast

rkyv-impl = __rkyv

Enables plugin-rt of swc_common and swc_plugin_proxy

__rkyv rkyv-impl?

Affects swc_plugin_runner::create_plugin_transform_executor

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

tokio plugin_transform…shared_runtime?
swc_css_ast css?
swc_ecma_ast ecma?
wasmer-cache not wasm32 filesystem_cache