[package]
name = "colonyos"
version = "1.0.3"
edition = "2021"
description = "Rust SDK for ColonyOS - build distributed applications with executors that can run anywhere"
license = "MIT"
repository = "https://github.com/colonyos/rust"
homepage = "https://colonyos.io"
documentation = "https://docs.rs/colonyos"
readme = "README.md"
keywords = ["colonies", "colonyos", "distributed", "computing", "orchestration"]
categories = ["api-bindings", "asynchronous", "web-programming"]

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["native"]
native = []
wasm = ["wasm-bindgen", "wasm-bindgen-futures"]

[dependencies]
# Cryptography
sha3 = "0.10"
hex = "0.4"
k256 = { version = "0.13", features = ["ecdsa", "sha256"] }

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# Encoding
base64 = "0.21"

# WASM support (optional)
wasm-bindgen = { version = "0.2.88", optional = true }
wasm-bindgen-futures = { version = "0.4.38", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Native dependencies
rand = "0.8"
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "0.21", features = ["rustls-tls-native-roots"] }
futures-util = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
# WASM dependencies
rand = { version = "0.8", features = ["getrandom"] }
getrandom = { version = "0.2", features = ["js"] }
reqwest = { version = "0.12", default-features = false, features = ["json"] }

[dev-dependencies]
tokio-test = "0.4"
random-string = "1.0"

[[example]]
name = "simple_executor"
path = "examples/simple_executor.rs"

[[example]]
name = "submit_process"
path = "examples/submit_process.rs"

[[example]]
name = "workflow"
path = "examples/workflow.rs"
