Skip to content

Commit

Permalink
make ts-rs crate optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Cifko committed Jan 25, 2024
1 parent 7b1a7aa commit 49d329c
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 28 deletions.
3 changes: 0 additions & 3 deletions applications/tari_dan_wallet_daemon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,3 @@ ignored = [
# Want to enable some log4rs features
"log4rs",
]

[features]
ts = []
3 changes: 0 additions & 3 deletions applications/tari_validator_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,3 @@ ignored = [
# Want to enable some log4rs features
"log4rs",
]

[features]
ts = []
4 changes: 2 additions & 2 deletions clients/tari_indexer_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
serde_with = { workspace = true }
thiserror = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions clients/validator_node_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ multiaddr = { workspace = true }
serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions clients/wallet_daemon_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ reqwest = { workspace = true, features = ["json"] }
serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/common_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ prost = { workspace = true }
prost-types = { workspace = true }
serde = { workspace = true, default-features = true }
ruint = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[build-dependencies]
tari_common = { workspace = true, features = ["build"] }
Expand All @@ -39,4 +39,4 @@ tari_common = { workspace = true, features = ["build"] }
ignored = ["prost", "prost-types"] # false positive, used in OUT_DIR structs

[features]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/engine_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ lazy_static = { workspace = true }
serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
default = ["debugging"]
# Includes the ability to create free test coins
debugging = []
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rand = { workspace = true }
thiserror = { workspace = true }
serde = { workspace = true, default-features = true }
time = { workspace = true, features = ["serde"] }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/tari_bor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde = { workspace = true, default-features = false, features = [
"alloc",
"derive",
] }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[dev-dependencies]
serde_json = { workspace = true }
Expand All @@ -24,4 +24,4 @@ default = ["std"]
std = ["ciborium/std", "serde/std"]
alloc = ["serde/alloc", "ciborium-io/alloc"]
json_encoding = []
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/template_abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ serde = { workspace = true, default-features = false, features = [
"derive",
] }
hashbrown = { workspace = true, optional = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
default = ["std"]
std = ["tari_bor/std"]
# TODO: look into how this is done properly
alloc = ["hashbrown"]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/template_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ serde = { workspace = true, default-features = false, features = [
"alloc",
] }
serde_with = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }


[dev-dependencies]
Expand All @@ -28,4 +28,4 @@ serde_json = { workspace = true }
default = ["macro", "std"]
macro = ["tari_template_macros"]
std = ["serde/std", "tari_bor/std"]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/transaction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tari_template_lib = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, default-features = true }
thiserror = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[features]
ts = []
ts = ["ts-rs"]
4 changes: 2 additions & 2 deletions dan_layer/wallet/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
zeroize = { workspace = true }
ts-rs = { workspace = true }
ts-rs = { workspace = true, optional = true }

[dev-dependencies]
tari_dan_wallet_storage_sqlite = { workspace = true }
tempfile = { workspace = true }

[features]
ts = []
ts = ["ts-rs"]

0 comments on commit 49d329c

Please sign in to comment.