Skip to content

Commit 7adb612

Browse files
refactor: rename zkstack crates with unique names for publishing (#3443)
## What ❔ * [x] Rename `zkstack_cli` crates with unique names for publishing. * [x] Set individual versions of the `zkstack_cli` workspace crates to the common workspace version. <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ To allow publishing to crates.io. <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent ecccdda commit 7adb612

File tree

142 files changed

+446
-429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+446
-429
lines changed

zkstack_cli/Cargo.lock

Lines changed: 74 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zkstack_cli/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ keywords = ["zk", "cryptography", "blockchain", "ZKStack", "ZKsync"]
2121

2222
[workspace.dependencies]
2323
# Local dependencies
24-
common = { path = "crates/common" }
25-
config = { path = "crates/config" }
26-
types = { path = "crates/types" }
27-
git_version_macro = { path = "crates/git_version_macro" }
24+
zkstack_cli_common = { path = "crates/common" }
25+
zkstack_cli_config = { path = "crates/config" }
26+
zkstack_cli_types = { path = "crates/types" }
27+
zkstack_cli_git_version_macro = { path = "crates/git_version_macro" }
2828

2929
# ZkSync deps
3030
zksync_config = { path = "../core/lib/config" }

zkstack_cli/crates/common/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "common"
3-
version = "0.1.0"
2+
name = "zkstack_cli_common"
3+
version.workspace = true
44
edition.workspace = true
55
homepage.workspace = true
66
license.workspace = true
@@ -24,12 +24,12 @@ serde_yaml.workspace = true
2424
sqlx.workspace = true
2525
tokio.workspace = true
2626
toml.workspace = true
27-
types.workspace = true
27+
zkstack_cli_types.workspace = true
2828
url.workspace = true
2929
xshell.workspace = true
3030
thiserror.workspace = true
3131
strum.workspace = true
32-
git_version_macro.workspace = true
32+
zkstack_cli_git_version_macro.workspace = true
3333
async-trait.workspace = true
3434
zksync_system_constants.workspace = true
3535
zksync_types.workspace = true

zkstack_cli/crates/common/src/ethereum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use ethers::{
88
providers::Middleware,
99
types::{Address, TransactionRequest},
1010
};
11-
use types::TokenInfo;
11+
use zkstack_cli_types::TokenInfo;
1212

1313
use crate::{logger, wallets::Wallet};
1414

zkstack_cli/crates/common/src/version.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const GIT_VERSION: &str = git_version_macro::build_git_revision!();
2-
const GIT_BRANCH: &str = git_version_macro::build_git_branch!();
3-
const GIT_SUBMODULES: &[(&str, &str)] = git_version_macro::build_git_submodules!();
4-
const BUILD_TIMESTAMP: &str = git_version_macro::build_timestamp!();
1+
const GIT_VERSION: &str = zkstack_cli_git_version_macro::build_git_revision!();
2+
const GIT_BRANCH: &str = zkstack_cli_git_version_macro::build_git_branch!();
3+
const GIT_SUBMODULES: &[(&str, &str)] = zkstack_cli_git_version_macro::build_git_submodules!();
4+
const BUILD_TIMESTAMP: &str = zkstack_cli_git_version_macro::build_timestamp!();
55

66
/// Returns a multi-line version message that includes:
77
/// - provided crate version

zkstack_cli/crates/common/src/wallets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use ethers::{
44
types::{Address, H256},
55
};
66
use serde::{Deserialize, Serialize};
7-
use types::parse_h256;
7+
use zkstack_cli_types::parse_h256;
88

99
#[derive(Serialize, Deserialize)]
1010
struct WalletSerde {

zkstack_cli/crates/config/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "config"
3-
version = "0.1.0"
2+
name = "zkstack_cli_config"
3+
version.workspace = true
44
edition.workspace = true
55
homepage.workspace = true
66
license.workspace = true
@@ -13,15 +13,15 @@ keywords.workspace = true
1313
[dependencies]
1414
anyhow.workspace = true
1515
clap.workspace = true
16-
common.workspace = true
16+
zkstack_cli_common.workspace = true
1717
ethers.workspace = true
1818
rand.workspace = true
1919
serde.workspace = true
2020
serde_json.workspace = true
2121
serde_yaml.workspace = true
2222
strum.workspace = true
2323
thiserror.workspace = true
24-
types.workspace = true
24+
zkstack_cli_types.workspace = true
2525
url.workspace = true
2626
xshell.workspace = true
2727

zkstack_cli/crates/config/src/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use std::{
44
};
55

66
use serde::{Deserialize, Serialize, Serializer};
7-
use types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation};
87
use xshell::Shell;
8+
use zkstack_cli_types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation};
99
use zksync_basic_types::L2ChainId;
1010
use zksync_config::configs::{GatewayChainConfig, GatewayConfig};
1111

zkstack_cli/crates/config/src/ecosystem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ use std::{
33
path::{Path, PathBuf},
44
};
55

6-
use common::{config::global_config, logger};
76
use serde::{Deserialize, Serialize, Serializer};
87
use thiserror::Error;
9-
use types::{L1Network, ProverMode, WalletCreation};
108
use xshell::Shell;
9+
use zkstack_cli_common::{config::global_config, logger};
10+
use zkstack_cli_types::{L1Network, ProverMode, WalletCreation};
1111
use zksync_basic_types::L2ChainId;
1212

1313
use crate::{

zkstack_cli/crates/config/src/explorer_compose.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use std::{
44
};
55

66
use anyhow::Context;
7-
use common::{db, docker::adjust_localhost_for_docker};
87
use serde::{Deserialize, Serialize};
98
use url::Url;
9+
use zkstack_cli_common::{db, docker::adjust_localhost_for_docker};
1010

1111
use crate::{
1212
consts::{

0 commit comments

Comments
 (0)