Skip to content

Commit 2ab2a68

Browse files
refactor: move Cargo.toml from root to core workspace
1 parent 8518b3e commit 2ab2a68

File tree

40 files changed

+447
-436
lines changed

40 files changed

+447
-436
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ keys/setup
2020
!prover/
2121
!yarn.lock
2222
!package.json
23-
!Cargo.lock
24-
!Cargo.toml
23+
!core/Cargo.lock
24+
!core/Cargo.toml
2525
!contracts/
2626
!setup_2\^26.key
2727
!setup_2\^24.key

.githooks/pre-commit

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ check_fmt () {
1515
fi
1616
}
1717

18-
check_fmt
19-
20-
cd prover/
21-
22-
check_fmt
18+
( cd core/ && check_fmt )
19+
( cd prover/ && check_fmt )
20+
( cd zkstack_cli/ && check_fmt )

.github/workflows/cargo-license.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ jobs:
77
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
88
- uses: EmbarkStudios/cargo-deny-action@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268 # v2.0.1
99
with:
10+
manifest-path: "./core/Cargo.toml"
1011
command: check
1112
command-arguments: "--hide-inclusion-graph"

.github/workflows/ci-core-reusable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
ci_run zkstack dev test rust
8383
# Benchmarks are not tested by `cargo nextest` unless specified explicitly, and even then `criterion` harness is incompatible
8484
# with how `cargo nextest` runs tests. Thus, we run criterion-based benchmark tests manually.
85-
ci_run cargo test --release -p vm-benchmark --bench oneshot --bench batch
85+
ci_run cargo test --manifest-path ./core/Cargo.toml --release -p vm-benchmark --bench oneshot --bench batch
8686
8787
loadtest:
8888
runs-on: [ matterlabs-ci-runner-high-performance ]

.github/workflows/protobuf.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ jobs:
4747
git checkout $(git merge-base $BASE $HEAD) --recurse-submodules
4848
working-directory: ./before
4949
- name: compile before
50-
run: cargo check --all-targets
51-
working-directory: ./before/
50+
run: cargo check --manifest-path ./core/Cargo.toml --all-targets
51+
working-directory: ./before
5252
- name: build before.binpb
5353
run: >
5454
perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
55-
`find ./before/target/debug/build/*/output`
56-
| xargs cat > ./before.binpb
55+
`find ./before/core/target/debug/build/*/output`
56+
| xargs cat > ./before/.binpb
5757
5858
# after
5959
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
@@ -62,19 +62,21 @@ jobs:
6262
path: after
6363
submodules: recursive
6464
- name: compile after
65-
run: cargo check --all-targets
65+
run: cargo check --manifest-path ./core/Cargo.toml --all-targets
6666
working-directory: ./after
6767
- name: build after.binpb
6868
run: >
6969
perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
70-
`find ./after/target/debug/build/*/output`
70+
`find ./after/core/target/debug/build/*/output`
7171
| xargs cat > ./after.binpb
7272
7373
# compare
7474
- uses: bufbuild/buf-setup-action@54abbed4fe8d8d45173eca4798b0c39a53a7b658 # v1.39.0
7575
with:
7676
github_token: ${{ github.token }}
7777
- name: buf breaking
78-
run: >
79-
buf breaking './after.binpb' --against './before.binpb' --exclude-path 'zksync/config/experimental.proto'
80-
--config '{"version":"v1","breaking":{"use":["WIRE_JSON","WIRE"]}}' --error-format 'github-actions'
78+
run: |
79+
pwd
80+
ls -la
81+
buf breaking './after.binpb' --against './before.binpb' --exclude-path 'zksync/config/experimental.proto' \
82+
--config '{"version":"v1","breaking":{"use":["WIRE_JSON","WIRE"]}}' --error-format 'github-actions'

.github/workflows/vm-perf-comparison.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,19 @@ jobs:
6666
run: |
6767
ci_run zkstackup -g --local
6868
ci_run zkstack dev contracts --system-contracts
69-
ci_run cargo bench --package vm-benchmark --bench instructions -- --verbose
69+
ci_run cargo bench --manifest-path ./core/Cargo.toml --package vm-benchmark --bench instructions -- --verbose
7070
71-
ci_run cargo bench --package vm-benchmark --bench instructions -- --print > instructions.log 2>/dev/null
71+
ci_run cargo bench --manifest-path ./core/Cargo.toml \
72+
--package vm-benchmark --bench instructions -- --print > instructions.log 2>/dev/null
7273
# Output all lines from the benchmark result starting from the "## ..." comparison header.
7374
# Since the output spans multiple lines, we use a heredoc declaration.
7475
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
7576
echo "speedup<<$EOF" >> $GITHUB_OUTPUT
7677
sed -n '/^## /,$p' instructions.log >> $GITHUB_OUTPUT
7778
echo "$EOF" >> $GITHUB_OUTPUT
7879
79-
ci_run cargo run --package vm-benchmark --release --bin instruction_counts -- --diff base-opcodes > opcodes.log
80+
ci_run cargo run --manifest-path ./core/Cargo.toml \
81+
--package vm-benchmark --release --bin instruction_counts -- --diff base-opcodes > opcodes.log
8082
echo "opcodes<<$EOF" >> $GITHUB_OUTPUT
8183
sed -n '/^## /,$p' opcodes.log >> $GITHUB_OUTPUT
8284
echo "$EOF" >> $GITHUB_OUTPUT

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ zksync_pk.key
2626
dist
2727
todo
2828

29-
Cargo.lock
30-
!/Cargo.lock
31-
!/infrastructure/zksync-crypto/Cargo.lock
32-
!/prover/Cargo.lock
33-
!/zkstack_cli/Cargo.lock
34-
3529
/etc/env/target/*
3630
/etc/env/.current
3731
/etc/env/configs/*

0 commit comments

Comments
 (0)