Skip to content

Commit 783e6ff

Browse files
authored
Update ckb dependencies to v1.1.0 (#40)
* Update ckb dependencies to v1.1.0 * Use latest llvm-n-rust docker image * Remove Cargo.lock * Fix url
1 parent a15a501 commit 783e6ff

12 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
git submodule add https://github.com/nervosnetwork/ckb-c-stdlib deps/ckb-c-stdlib &&
4141
git submodule add https://github.com/xxuejie/lib-dummy-atomics deps/lib-dummy-atomics
4242
- name: Lock Rust version
43-
run: cd test-workspace && echo "1.85.1" > rust-toolchain
43+
run: cd test-workspace && echo "1.92.0" > rust-toolchain
4444
- name: Install riscv64 target & clippy
4545
run: cd test-workspace && rustup target add riscv64imac-unknown-none-elf && rustup component add clippy
4646
- name: Run all checks
@@ -60,7 +60,7 @@ jobs:
6060
- name: Generate standalone contract
6161
run: cargo generate --path . standalone-contract --name test-contract
6262
- name: Lock Rust version
63-
run: cd test-contract && echo "1.85.1" > rust-toolchain
63+
run: cd test-contract && echo "1.92.0" > rust-toolchain
6464
- name: Run all checks
6565
run: cd test-contract && make build test check clippy
6666
- name: Reproducible build runs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The templates provided here, use the same conventions as `ckb-native-build-sampl
189189

190190
When using this set of templates, we always recommend to use locally installed native versions of LLVM & Rust to build and test your scripts. However, reproducible build is an important part of CKB scripts, which would require locked versions of LLVM & Rust to work. It might not be an easy task when using locally installed versions of compilers.
191191

192-
For the time being, we have prepared a script that does reproducible build via [a docker container image](https://github.com/cryptape/llvm-n-rust). We do want to mention that docker is not necessarily THE way to do reproducible build, nor is it the best way to do reproducible build. There might well be other ways that are better, such as chroot or Nix. It's just that historically, docker has been used in CKB script's build process, and adding a script leveraging docker here, provides an easy solution into the issue.
192+
For the time being, we have prepared a script that does reproducible build via [a docker container image](https://github.com/nervosnetwork/llvm-n-rust). We do want to mention that docker is not necessarily THE way to do reproducible build, nor is it the best way to do reproducible build. There might well be other ways that are better, such as chroot or Nix. It's just that historically, docker has been used in CKB script's build process, and adding a script leveraging docker here, provides an easy solution into the issue.
193193

194194
To do reproducible build, you can use the included script with varying commands:
195195

atomics-contract/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
ckb-std = { version = "1.0", default-features = false, features = ["allocator", "calc-hash", "ckb-types", "libc"] }
7+
ckb-std = { version = "1.1", default-features = false, features = ["allocator", "calc-hash", "ckb-types", "libc"] }
88
log = { version = "0.4.20", default-features = false }
99

1010
[build-dependencies]

contract-without-simulator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
ckb-std = "1.0"
7+
ckb-std = "1.1"

contract/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
ckb-std = "1.0"
7+
ckb-std = "1.1"
88

99
[features]
1010
library = []

native-simulator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2024"
55

66
[dependencies]
77
{{project-name | append: "@@SIMULATOR_PLACEHOLDER@@" | remove: "-sim@@SIMULATOR_PLACEHOLDER@@"}} = { path = "../../contracts/{{project-name | append: "@@SIMULATOR_PLACEHOLDER@@" | remove: "-sim@@SIMULATOR_PLACEHOLDER@@"}}", features = ["native-simulator"] }
8-
ckb-std = { version = "1.0", features = ["native-simulator"] }
8+
ckb-std = { version = "1.1", features = ["native-simulator"] }
99
ctor = "0.6"
1010

1111
[lib]

stack-reorder-contract/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
ckb-std = "1.0"
7+
ckb-std = "1.1"
88

99
[build-dependencies]
1010
cc = "1.0"

standalone-contract/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
ckb-std = "1.0"
7+
ckb-std = "1.1"
88

99
[dev-dependencies]
10-
ckb-testtool = "1.0"
10+
ckb-testtool = "1.1"
1111
serde_json = "1.0"

standalone-contract/scripts/reproducible_build_docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
set -ex
88

99
DOCKER="${DOCKER:-docker}"
10-
# docker pull docker.io/cryptape/llvm-n-rust:20250617
11-
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/cryptape/llvm-n-rust@sha256:d6d1f9a6656039273210de91913c828f5b4aa4a3282d2c93ed19bcb7bbf728fe}"
10+
# docker pull nervos/llvm-n-rust:20260325
11+
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/nervos/llvm-n-rust@sha256:cfe226cbb93955b72209eac9db2d99b9405b03871972ea2998c7059dc4dd920f}"
1212
CHECKSUM_FILE_PATH="${CHECKSUM_FILE_PATH:-checksums.txt}"
1313

1414
# We are parsing command line arguments based on tips from:

workspace/scripts/reproducible_build_docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
set -ex
88

99
DOCKER="${DOCKER:-docker}"
10-
# docker pull docker.io/cryptape/llvm-n-rust:20250617
11-
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/cryptape/llvm-n-rust@sha256:d6d1f9a6656039273210de91913c828f5b4aa4a3282d2c93ed19bcb7bbf728fe}"
10+
# docker pull nervos/llvm-n-rust:20260325
11+
DOCKER_IMAGE="${DOCKER_IMAGE:-docker.io/nervos/llvm-n-rust@sha256:cfe226cbb93955b72209eac9db2d99b9405b03871972ea2998c7059dc4dd920f}"
1212
CHECKSUM_FILE_PATH="${CHECKSUM_FILE_PATH:-checksums.txt}"
1313

1414
# We are parsing command line arguments based on tips from:

0 commit comments

Comments
 (0)