razeri-plugin-api 0.23.0

Extension traits and registries for Razeri plugins
Documentation
[package]
name = "razeri-plugin-api"
# The published crates version independently of the workspace: a crates.io
# version is burned on publish, while the workspace version is free to move.
version = "0.23.0"
edition.workspace = true
rust-version.workspace = true
# One of the two open crates in an otherwise proprietary workspace: plugin
# authors depend on this surface, so it carries its own permissive license.
license = "MIT OR Apache-2.0"
# Where a crates.io reader is sent: the place scripts/release/public-posture.toml
# names, since razeri's own source is private.
repository = "https://github.com/gaoash/razeri-releases"
authors = ["Gabriel Shea"]
description = "Extension traits and registries for Razeri plugins"
readme = "README.md"
documentation = "https://docs.rs/razeri-plugin-api"
categories = ["database", "development-tools"]
keywords = ["razeri", "plugin", "extensibility", "sql"]

[dependencies]
razeri-plugin-contract = { path = "../razeri-plugin-contract", version = "0.21.0" }
async-trait = "0.1"
inventory = "0.3"
serde = { workspace = true }
serde_json = { workspace = true }
chrono = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }

# tokio "full" (via the workspace) pulls `net` → `mio`, which has no
# wasm32-unknown-unknown backend, and `libloading` (dlopen) is nonsensical in a
# browser. Both are native-only here, so the wasm build (razeri-web depends on
# this crate transitively via razeri-osi → razeri-dialects) gets a minimal,
# wasm-safe tokio and no libloading. Native builds still unify to full via
# razeri-api, so nothing native-side changes. See the file/dynamic-plugin
# modules, which are `cfg(not(wasm))`-gated to match.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true }
libloading = { workspace = true, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { version = "1.52", default-features = false, features = ["sync"] }

[features]
default = ["dynamic"]
# On wasm `libloading` is not a dependency, so the dynamic-loader code is
# additionally `cfg(not(wasm))`-gated; the feature is a no-op there.
dynamic = ["dep:libloading"]

[dev-dependencies]
tokio = { workspace = true }
tempfile = "3"