forked from 1b-agent/opencadstudio-upstream
48 lines
2.1 KiB
TOML
48 lines
2.1 KiB
TOML
[package]
|
|
name = "opencad-python"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Python scripting for Open CAD Studio (embeds RustPython)."
|
|
license = "GPL-3.0-only"
|
|
|
|
[workspace]
|
|
resolver = "2"
|
|
|
|
# A plugin is a C-ABI dynamic library the host loads at runtime.
|
|
[lib]
|
|
crate-type = ["cdylib"]
|
|
|
|
[features]
|
|
default = []
|
|
# Requires an external HostApi patch providing run_command/set_selection.
|
|
# Never enable against the released OCS host: nested command replay can hang.
|
|
experimental-command-replay = []
|
|
# Requires the general HostApi system-variable methods in this OCS fork.
|
|
experimental-host-settings = []
|
|
# Requires the in-tree OCS host API v7.
|
|
experimental-host-model = ["dep:serde_json"]
|
|
|
|
[dependencies]
|
|
# The stable contract, with the runtime `host` surface (HostApi / BuiltinPlugin).
|
|
ocs_plugin_api = { path = "../../crates/ocs_plugin_api", features = ["host"] }
|
|
# Embedded interpreter for Phase 1 (see this crate's PLUGIN.md and ROADMAP.md).
|
|
# default-features = false, no "host_env": that default feature bakes `posix`
|
|
# (full filesystem access, confirmed: open('/etc/passwd').read() works with
|
|
# it on) and `_ctypes` (raw native-code-calling primitives) into every
|
|
# interpreter unconditionally, regardless of never adding rustpython-stdlib —
|
|
# see this crate's PLUGIN.md's sandboxing section for the audit that found
|
|
# this. "compiler" is required (Vm::compile); "gc" matches the default set
|
|
# for normal memory behavior. "wasmbind"/"stdio" are irrelevant off-web.
|
|
rustpython-vm = { version = "0.5", default-features = false, features = ["compiler", "gc"] }
|
|
serde_json = { version = "1", optional = true }
|
|
|
|
[build-dependencies]
|
|
# No "host" feature: `type_registry`/`type_registry_types` (the only modules
|
|
# build.rs touches, via `get_embedded_type_registry_json`) are unconditionally
|
|
# compiled and depend on nothing but `serde` — the "host" feature only adds
|
|
# the acadrust-typed runtime surface build.rs has no use for. See this crate's
|
|
# own `src/lib.rs` doc comment on the module split.
|
|
ocs_plugin_api = { path = "../../crates/ocs_plugin_api" }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|