wasm-rquickjs 0.2.2

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
Documentation
[package]
name = "rquickjs-component"
version = "0.0.1"
edition = "2024"

[workspace]

[profile.release]
opt-level = "s"
lto = true

[lib]
path = "src/lib.rs"
crate-type = ["cdylib"]

[features]
default = ["normal"]

# Tier meta-features (cumulative)
lite = ["fetch"]
normal = ["lite", "node-http", "crypto", "zlib", "logging", "encoding"]
full = ["normal", "crypto-full", "brotli", "sqlite", "timezone"]
full-no-logging = ["lite", "node-http", "crypto", "zlib", "encoding", "crypto-full", "brotli", "sqlite", "timezone"]

# Individual capabilities
fetch = ["dep:golem-wasi-http"]
node-http = []

logging = ["dep:wasi-logging"]
encoding = ["dep:encoding_rs"]
zlib = ["dep:flate2", "dep:crc32fast"]
brotli = ["dep:brotli"]

# Crypto: common subset
crypto = [
  "dep:sha1", "dep:sha2", "dep:md-5", "dep:digest", "dep:hmac",
  "dep:pbkdf2", "dep:hkdf",
  "dep:aes", "dep:aes-gcm", "dep:cbc", "dep:ctr", "dep:cipher", "dep:subtle",
  "dep:p256", "dep:ed25519-dalek",
  "dep:ecdsa", "dep:elliptic-curve", "dep:pkcs8", "dep:sec1", "dep:signature",
]

# Crypto: full (adds RSA, p384, k256, SHA-3, exotic ciphers, scrypt)
crypto-full = [
  "crypto",
  "dep:rsa", "dep:num-bigint-dig", "dep:num-traits",
  "dep:p384", "dep:k256",
  "dep:sha3", "dep:ripemd", "dep:whirlpool",
  "dep:scrypt",
  "dep:des", "dep:blowfish", "dep:chacha20", "dep:chacha20poly1305", "dep:ccm",
  "dep:dsa",
]

sqlite = ["dep:rusqlite"]
timezone = ["dep:chrono-tz"]
golem = ["dep:golem-context", "dep:golem-websocket"]

[dependencies]
# Core dependencies
rquickjs = { version = "0.10.0", default-features = false, features = ["std", "futures", "bindgen", "loader", "macro"] }

encoding_rs = { version = "0.8.35", optional = true }
sha1 = { version = "0.10", features = ["oid"], optional = true }
sha2 = { version = "0.10", features = ["oid"], optional = true }
sha3 = { version = "0.10", optional = true }
md-5 = { version = "0.10", features = ["oid"], optional = true }
ripemd = { version = "0.1", optional = true }
whirlpool = { version = "0.10", optional = true }
digest = { version = "0.10", optional = true }
hmac = { version = "0.12", optional = true }
pbkdf2 = { version = "0.12", features = ["hmac"], optional = true }
hkdf = { version = "0.12", optional = true }
scrypt = { version = "0.11", default-features = false, optional = true }
subtle = { version = "2", optional = true }
aes = { version = "0.8", optional = true }
aes-gcm = { version = "0.10", optional = true }
ccm = { version = "0.5", optional = true }
chacha20poly1305 = { version = "0.10", optional = true }
chacha20 = { version = "0.9", optional = true }
des = { version = "0.8", optional = true }
blowfish = { version = "0.9.1", optional = true }
cbc = { version = "0.1", features = ["alloc"], optional = true }
ctr = { version = "0.9", optional = true }
cipher = { version = "0.4", optional = true }
ed25519-dalek = { version = "2", default-features = false, features = ["rand_core", "pkcs8"], optional = true }
p256 = { version = "0.13", default-features = false, features = ["ecdsa", "pkcs8", "pem", "ecdh"], optional = true }
p384 = { version = "0.13", default-features = false, features = ["ecdsa", "pkcs8", "pem", "ecdh"], optional = true }
k256 = { version = "0.13", default-features = false, features = ["ecdsa", "pkcs8", "pem", "ecdh"], optional = true }
num-bigint-dig = { version = "0.8", features = ["prime", "rand"], optional = true }
num-traits = { version = "0.2", optional = true }
pkcs8 = { version = "0.10", default-features = false, features = ["pem", "alloc", "encryption"], optional = true }
rsa = { version = "0.9", default-features = false, features = ["pem", "hazmat"], optional = true }
dsa = { version = "0.6", default-features = false, optional = true }
elliptic-curve = { version = "0.13", default-features = false, features = ["sec1", "pem", "alloc"], optional = true }
ecdsa = { version = "0.16", default-features = false, features = ["signing", "verifying", "der"], optional = true }
signature = { version = "2", optional = true }
futures = { version = "0.3.31", features = [] }
futures-concurrency = "7.6.3"
url = "2.5.7"
uuid = { version = "1.18.1", features = ["v4"] }
rand = "0.9.2"
rand_core_06 = { package = "rand_core", version = "0.6", features = ["getrandom"] }
sec1 = { version = "0.7", default-features = false, features = ["der", "alloc", "pem", "pkcs8"], optional = true }
base64ct = { version = "1", features = ["alloc"] }
flate2 = { version = "1", default-features = false, features = ["rust_backend"], optional = true }
brotli = { version = "7", default-features = false, features = ["std"], optional = true }
crc32fast = { version = "1", optional = true }
wasip2 = "1.0"
wit-bindgen-rt = { version = "0.42.1", features = ["bitflags"] }
wit-bindgen = { version = "0.42.1", default-features = false, features = ["macros"] }
wstd = "=0.6.5"
chrono = { version = "0.4", default-features = false, features = ["alloc"] }
chrono-tz = { version = "0.10", default-features = false, optional = true }
unicode-segmentation = "1.12"

# HTTP
golem-wasi-http = { version = "0.2.0", features = ["async"], optional = true }

# Logging
wasi-logging = { version = "0.0.1", optional = true }

# SQLite
rusqlite = { version = "0.38", default-features = false, features = ["bundled", "wasm32-wasi-vfs", "functions", "session", "backup", "serialize"], optional = true }

# Golem
golem-context = { version = "0.0.1", optional = true }
golem-websocket = { version = "0.0.2", optional = true }

# Patch rusqlite and libsqlite3-sys together for wasm32-wasi: the fork carries
# both the serialize/deserialize flag typing fix and the session-enabled WASI
# bindings.
[patch.crates-io]
rusqlite = { git = "https://github.com/golemcloud/rusqlite", branch = "v0.38.0-patched" }
libsqlite3-sys = { git = "https://github.com/golemcloud/rusqlite", branch = "v0.38.0-patched" }