[package] edition = "2021" name = "w3s" version = "0.2.10" license = "MIT OR Apache-2.0" documentation = "https://docs.rs/w3s" repository = "https://github.com/qdwang/w3s-rs" description = "A Rust crate to the easily upload file or directory to Web3.Storage with optional encryption and compression" keywords = ["w3s", "ipfs", "filecoin", "web3storage", "web3"] categories = ["api-bindings", "accessibility"] [dev-dependencies] anyhow = "1" tokio = { version = "1", features = ["macros"] } [dependencies] futures = "0.3" reqwest = { version = "0.11", features = ["stream"] } serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "1" tokio = { version = "1", features = ["rt", "io-util", "rt-multi-thread"] } tl = "0.7.7" async-recursion = "1" html-escape = "0.2" # for ipfs car file creation multihash = "0.16" cid = "0.8" ipld = { package = "libipld", version = "0.13" } ipld-cbor = { package = "libipld-cbor", version = "0.13" } ipld-pb = { package = "libipld-pb", version = "0.13" } unixfs-v1 = "0.2" quick-protobuf = "0.8" integer-encoding = { version = "3.0", features = ["tokio_async"] } # --- optional --- rand = { version = "0.8", optional = true } ## encryption argon2 = { version = "0.4", optional = true } chacha20 = { version = "0.9", optional = true } poly1305 = { version = "0.7", optional = true } aead = { version = "0.4", optional = true } zeroize = { version = "1", optional = true } ## compression zstd = { version = "0.11", optional = true } [features] encryption = ["rand", "argon2", "chacha20", "poly1305", "aead", "zeroize"] all = ["zstd", "encryption"] # examples [[example]] name = "download-decrypt-decompress-file" path = "examples/download/download-decrypt-decompress-file.rs" required-features = ["encryption", "zstd"] [[example]] name = "download-decrypt-file" path = "examples/download/download-decrypt-file.rs" required-features = ["encryption"] [[example]] name = "download-file" path = "examples/download/download-file.rs" [[example]] name = "file-upload" path = "examples/upload/file-upload.rs" [[example]] name = "file-encrypt-upload" path = "examples/upload/file-encrypt-upload.rs" required-features = ["encryption"] [[example]] name = "file-compress-upload" path = "examples/upload/file-compress-upload.rs" required-features = ["zstd"] [[example]] name = "file-car-upload" path = "examples/upload/file-car-upload.rs" [[example]] name = "file-compress-encrypt-car-upload" path = "examples/upload/file-compress-encrypt-car-upload.rs" required-features = ["encryption", "zstd"]