foldit-plugin-sdk 0.2.1

Foldit plugin SDK - owns plugin.proto, the protocol types, and the Plugin trait; exposes a cbindgen C-ABI and pyo3 Python bindings
Documentation
[workspace]

[package]
name = "foldit-plugin-sdk"
version = "0.2.1"
edition = "2021"
authors = ["Andreas Petrides"]
license = "MIT"
description = "Foldit plugin SDK - owns plugin.proto, the protocol types, and the Plugin trait; exposes a cbindgen C-ABI and pyo3 Python bindings"
repository = "https://github.com/foldit-org/foldit-plugin-sdk"
keywords = ["plugin", "protein", "rosetta", "bioinformatics", "ffi"]
categories = ["science", "development-tools::ffi"]

[lib]
name = "foldit_plugin_sdk"
# rlib for Rust consumers, cdylib for the pyo3 extension module, staticlib
# for the C-ABI consumed by the rosetta C++ bridge.
crate-type = ["rlib", "cdylib", "staticlib"]

[dependencies]
# Codegen output (generated by build.rs, no_std-friendly).
prost = "0.13"
thiserror = "2"
# Only EntityId (raw()/from_raw()) is used.
molex = "0.8.0"
# Pinned to 0.29 to match foldit-python-host: the SDK's pyclasses cross
# python-host's in-process boundary, so the pyo3 versions must agree.
pyo3 = { version = "0.29", optional = true }

[build-dependencies]
prost-build = "0.13"
# Pure-Rust protobuf compiler, so build.rs needs no system protoc. Pinned to
# the protox release whose prost-types line matches prost-build 0.13.
protox = "0.7"
# Pinned to match the runner's generator: 0.29.4 emits extra C23 enum-typedef
# guards, so a looser bound drifts the generated header byte-for-byte from the
# runner's committed copy even though the ABI is identical.
cbindgen = "=0.29.2"

[features]
default = []
python = ["dep:pyo3"]
# Only for building the importable Python extension (via maturin). Enabling
# this tells the linker NOT to link libpython, so it CANNOT be active during
# `cargo test` (a standalone test binary would fail to resolve Py* symbols).
extension-module = ["pyo3/extension-module"]

# ── Lint policy ──────────────────────────────────────────────────────────────
# Mirrors the foldit-runner / molex / viso guardrail set. Strict on pedantic +
# nursery + cargo lint groups, with targeted restriction lints (no unwrap /
# expect / panic / print* / dbg in library code). Inline definition because
# this crate is its own standalone workspace.
[lints.clippy]
# Broad lint groups (lower priority so individual lints can override)
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
cargo = { level = "deny", priority = -1 }
# Restriction lints (opt-in, not covered by the groups above)
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"
dbg_macro = "deny"
print_stdout = "deny"
print_stderr = "deny"
str_to_string = "deny"

# Multiple crate versions: transitive deps - not actionable
multiple_crate_versions = "allow"

# Pedantic allowances
missing_const_for_fn = "allow"
default_trait_access = "allow"
doc_markdown = "allow"
similar_names = "allow"
items_after_statements = "allow"
use_self = "allow"
redundant_pub_crate = "allow"

[lints.rust]
missing_docs = "deny"
unused_results = "deny"
unused_qualifications = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"

[lints.rustdoc]
broken_intra_doc_links = "deny"
private_intra_doc_links = "deny"
bare_urls = "deny"