37 lines
1.1 KiB
TOML
37 lines
1.1 KiB
TOML
# Standalone Cargo.toml — targets wasm32-wasip2.
|
|
#
|
|
# Build with:
|
|
# cargo build --release --target wasm32-wasip2
|
|
|
|
[package]
|
|
name = "text_anonymize"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
authors = ["Dr. Stefan Flemming <chain@flemming.ai>"]
|
|
license = "Apache-2.0"
|
|
publish = false
|
|
description = "F∆I module — regex-based PII anonymization for plain text"
|
|
repository = "https://git.flemming.ai/fai-modules/text-anonymize"
|
|
rust-version = "1.85"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
chain-module-sdk = { git = "https://git.flemming.ai/fai/chain-module-sdk-rust.git", branch = "main" }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
# Regex without the unicode-perl / unicode-script / unicode-segment
|
|
# features keeps the wasm payload <300kB. The patterns this module
|
|
# uses (email, phone, IBAN, BIC, IPv4, German tax id, name list)
|
|
# are ASCII-class enough to live without the full Unicode tables.
|
|
regex = { version = "1.10", default-features = false, features = ["std", "unicode-case", "unicode-perl"] }
|
|
|
|
[dev-dependencies]
|
|
serde_json = "1"
|
|
|
|
[profile.release]
|
|
opt-level = "s"
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|