[package] name = "atproto-plc" version = "0.2.0" authors = ["Nick Gerakines "] edition = "2024" rust-version = "1.90.0" license = "MIT OR Apache-2.0" description = "did-method-plc implementation for ATProto with WASM support" repository = "https://tangled.org/@smokesignal.events/atproto-plc" keywords = ["atprotocol", "did", "did-method-plc", "wasm"] categories = ["cryptography", "web-programming", "wasm"] [package.metadata.wasm-pack.profile.release] wasm-opt = ["-O", "--enable-bulk-memory"] [lib] crate-type = ["cdylib", "rlib"] [dependencies] # Cryptographic dependencies p256 = { version = "0.13", features = ["ecdsa", "std"] } k256 = { version = "0.13", features = ["ecdsa", "sha256", "std"] } sha2 = "0.10" signature = "2.2" rand = "0.8" # Encoding dependencies base64 = "0.22" data-encoding = "2.5" bs58 = "0.5" # Serialization serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_bytes = "0.11" # DAG-CBOR support ipld-core = "0.4" serde_ipld_dagcbor = "0.6" cid = "0.11" multihash = "0.19" # Error handling thiserror = "2.0" anyhow = "1.0" # Utilities chrono = { version = "0.4", features = ["serde"] } zeroize = { version = "1.7", features = ["derive"] } subtle = "2.5" # Optional: async support async-trait = { version = "0.1", optional = true } tokio = { version = "1.35", optional = true, features = ["macros", "rt-multi-thread"] } # Binary dependencies (for plc-audit) reqwest = { version = "0.12", features = ["json", "blocking"], optional = true } clap = { version = "4.5", features = ["derive"], optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] # getrandom is a transitive dependency of rand, and needs "js" feature for wasm32 getrandom = { version = "0.2", features = ["js"]} # Optional WASM-specific dependencies wasm-bindgen = { version = "0.2", features = ["serde-serialize"], optional = true } wasm-bindgen-futures = { version = "0.4", optional = true } serde-wasm-bindgen = { version = "0.6", optional = true } web-sys = { version = "0.3", features = ["console"], optional = true } js-sys = { version = "0.3", optional = true } [dev-dependencies] hex = "0.4" pretty_assertions = "1.4" criterion = { version = "0.7", features = ["html_reports"] } proptest = "1.4" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3" [features] default = [] wasm = ["wasm-bindgen", "wasm-bindgen-futures", "serde-wasm-bindgen", "web-sys", "js-sys"] async = ["async-trait", "tokio"] cli = ["reqwest", "clap"] [[bin]] name = "plc-audit" path = "src/bin/plc-audit.rs" required-features = ["cli"] [[bin]] name = "plc-fork-viz" path = "src/bin/plc-fork-viz.rs" required-features = ["cli"] [profile.release] opt-level = "z" # Optimize for size lto = true # Enable Link Time Optimization codegen-units = 1 # Single codegen unit for better optimization strip = true # Strip symbols panic = "abort" # Smaller panic handler [profile.wasm] inherits = "release" opt-level = "z" lto = "fat" [[bench]] name = "validation" harness = false