facett-py/Cargo.toml
[package]
name = "facett-py"
description = "facett — native Python bindings (pyo3/maturin). A cdylib exposing facett's pure-Rust component registry (facet-wrapped) to Python: enumerate the wrapped components and read each one's state_json WITHOUT a browser or the wasm/eframe stack. The headless, direct-call companion to the wasm build."
version = "0.2.0"
edition = "2024"
license = "MIT"
repository = "https://git.gunnar.rs/nordisk/facett"
publish = false
# A native CPython extension module (`facett_native`), built by maturin into a wheel.
# cdylib only — this crate is NOT a workspace member and never enters the normal
# `cargo build` of the facett workspace (see the detached `[workspace]` table below and
# the root manifest's `exclude`). So pyo3 — which links libpython — is quarantined here
# and can never leak into facett's default build.
[lib]
name = "facett_native"
crate-type = ["cdylib"]
[dependencies]
# Reuse the SAME registry the Streamlit wasm panel uses (no duplicated component list):
# facet-wrapped's host rlib carries `Registry::with_builtins()`, `manifest_json`, and
# `component_state_json`. Depending on it by path pulls only its host (rlib) surface — the
# wasm-only deps (wasm-bindgen/eframe) are behind `cfg(target_arch = "wasm32")` and stay
# out of this native build.
facet-wrapped = { path = "../facet-wrapped", version = "0.2.0" }
# abi3-py39 → one stable-ABI wheel (cp39-abi3) that loads on CPython 3.9+ (incl. 3.14),
# so the wheel is not welded to the exact interpreter that built it.
pyo3 = { version = "0.29", features = ["extension-module", "abi3-py39"] }
# Detached from the facett workspace: this empty table makes `facett-py/` its OWN
# workspace root, so the facett workspace's `cargo build`/`cargo test` never compile it
# (and never pull pyo3). maturin runs cargo from here, where this table takes effect.
[workspace]
package = {}