Skip to content

Commit

Permalink
chore: publish wasm dependencies to crates (#778)
Browse files Browse the repository at this point in the history
Adds versions and updates publish_crates.sh script

---------

Co-authored-by: Stan Bondi <[email protected]>
  • Loading branch information
stringhandler and sdbondi authored Dec 21, 2023
1 parent 3d83a46 commit cd0f704
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 226 deletions.
10 changes: 6 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# NOTE: When editing this version, also edit the versions in template_built_in/templates/account and account_nft
[workspace.package]
version = "0.3.0"
edition = "2021"
Expand Down Expand Up @@ -53,6 +54,8 @@ members = [
resolver = "2"

[workspace.dependencies]
# version numbers are required for deploying to crates.io. Hopefully we can work out a way of
# specifying them in a single place and having them applied to all crates

# internal dependencies among workspace crates
libp2p-messaging = { path = "networking/libp2p-messaging"}
Expand All @@ -62,7 +65,7 @@ proto_builder = { path = "networking/proto_builder" }
sqlite_message_logger = { path = "networking/sqlite_message_logger" }
tari_base_node_client = { path = "clients/base_node_client" }
# avoid including default features so each crate can choose which ones to import
tari_bor = { path = "dan_layer/tari_bor", default-features = false }
tari_bor = { version = "0.3.0", path = "dan_layer/tari_bor", default-features = false }
tari_comms_rpc_state_sync = { path = "dan_layer/comms_rpc_state_sync" }
tari_consensus = { path = "dan_layer/consensus" }
tari_dan_app_utilities = { path = "applications/tari_dan_app_utilities" }
Expand All @@ -84,10 +87,10 @@ tari_rpc_framework = { path = "networking/rpc_framework" }
tari_rpc_macros = { path = "networking/rpc_macros" }
tari_state_store_sqlite = { path = "dan_layer/state_store_sqlite" }
tari_swarm = { path = "networking/swarm" }
tari_template_abi = { path = "dan_layer/template_abi" }
tari_template_abi = { version="0.3.0", path = "dan_layer/template_abi" }
tari_template_builtin = { path = "dan_layer/template_builtin" }
tari_template_lib = { path = "dan_layer/template_lib" }
tari_template_macros = { path = "dan_layer/template_macros" }
tari_template_macros = { version="0.3.0", path = "dan_layer/template_macros" }
tari_template_test_tooling = { path = "dan_layer/template_test_tooling" }
tari_transaction = { path = "dan_layer/transaction" }
tari_transaction_manifest = { path = "dan_layer/transaction_manifest" }
Expand Down Expand Up @@ -139,7 +142,6 @@ bytes = "1.5"
cacache = "12.0.0"
cargo_metadata = "0.15.3"
cargo_toml = "0.11.5"
# git rev: include fix from https://github.com/enarx/ciborium/pull/80
ciborium = { git = "https://github.com/enarx/ciborium.git", rev = "114614d2a61102eb2321c68e53799d1e6f087aef", default-features = false }
ciborium-io = { git = "https://github.com/enarx/ciborium.git", rev = "114614d2a61102eb2321c68e53799d1e6f087aef", default-features = false }
clap = "3.2.25"
Expand Down
1 change: 1 addition & 0 deletions dan_layer/template_builtin/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fn main() -> Result<(), Box<dyn Error>> {
for template in TEMPLATE_BUILTINS {
// we only want to rebuild if a template was added/modified
println!("cargo:rerun-if-changed={}/src", template);
println!("cargo:rerun-if-changed={}/Cargo.toml", template);

let template_path = env::current_dir()?.join(template);

Expand Down
4 changes: 2 additions & 2 deletions dan_layer/template_builtin/templates/account/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
[package]
name = "account"
version = "0.1.0"
version = "0.3.0"
edition = "2021"

[dependencies]
Expand All @@ -16,4 +16,4 @@ panic = 'abort' # Abort on panic.
strip = "debuginfo" # Strip debug info.

[lib]
crate-type = ["cdylib", "lib"]
crate-type = ["cdylib", "lib"]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
[package]
name = "account_nfts"
version = "0.1.0"
version = "0.3.0"
edition = "2021"

[dependencies]
Expand Down
200 changes: 0 additions & 200 deletions dan_layer/template_macros/Cargo.lock

This file was deleted.

8 changes: 4 additions & 4 deletions dan_layer/template_test_tooling/templates/faucet/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 9 additions & 15 deletions scripts/publish_crates.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
#!/usr/bin/env bash
# NB: The order these are listed in is IMPORTANT! Dependencies must go first

#dan_layer/tari_bor
#dan_layer/template_abi
#dan_layer/template_macros
#dan_layer/template_lib

packages=${@:-'
infrastructure/derive
infrastructure/shutdown
infrastructure/storage
infrastructure/test_utils
common
comms
comms/dht
base_layer/service_framework
base_layer/mmr
base_layer/key_manager
base_layer/p2p
base_layer/core
base_layer/wallet
base_layer/wallet_ffi
applications/tari_base_node
dan_layer/tari_bor
dan_layer/template_abi
dan_layer/template_macros
dan_layer/template_lib
'}
p_arr=($packages)

Expand Down

0 comments on commit cd0f704

Please sign in to comment.