Skip to content

Commit

Permalink
Upgrade ckb-std to 0.15 (#45)
Browse files Browse the repository at this point in the history
* chore: upgrade ckb-std
* Optimize Cargo.toml dependencies
---------

Co-authored-by: quake <quake.wang@gmail.com>
  • Loading branch information
joii2020 and quake authored Apr 3, 2024
1 parent a4497ed commit 4253ba8
Show file tree
Hide file tree
Showing 23 changed files with 1,239 additions and 1,793 deletions.
4 changes: 2 additions & 2 deletions ckb-auth-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ edition = "2021"
default = ["dynamic-library-memory-200"]
ckb2023 = ["ckb-std/ckb2023"]

enable-dynamic-library = ["lazy_static"]
enable-dynamic-library = ["lazy_static", "ckb-std/dlopen-c", "ckb-std/ckb-types"]
dynamic-library-memory-200 = ["enable-dynamic-library"]
# enable these features when memory is not enough
dynamic-library-memory-400 = ["enable-dynamic-library"]
dynamic-library-memory-600 = ["enable-dynamic-library"]

[dependencies]
ckb-std = "0.14.3"
ckb-std = { version = "0.15", default-features = false }
lazy_static = { version = "1.4.0", optional = true, features = ["spin_no_std"] }

[target.'cfg(target_arch = "riscv64")'.dependencies]
Expand Down
16 changes: 8 additions & 8 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,33 @@ clean-c-tests:
rm -rf auth-c-tests/target

rust-demo-tests:
export PATH=$(shell pwd)/bin/:"$(PATH)" && cd auth-rust-lock/ && capsule build && capsule test
export PATH=$(shell pwd)/bin/:"$(PATH)" && \
cd auth-rust-lock/ && \
capsule build --release && \
cd tests && \
cargo test

clean-rust-demo-tests:
export PATH=$(shell pwd)/bin/:"$(PATH)" && cd auth-rust-lock/ && capsule clean

rust-demo-tests-no-def-features: clean-rust-demo-tests
export PATH=$(shell pwd)/bin/:"$(PATH)" && \
cd auth-rust-lock && \
capsule build -- --no-default-features && \
capsule build --release -- --no-default-features && \
cd tests && \
cargo test --no-default-features

rust-demo-tests-only-ckb2023: clean-rust-demo-tests
export PATH=$(shell pwd)/bin/:"$(PATH)" && \
cd auth-rust-lock && \
capsule build -- --no-default-features --features="ckb2023" && \
capsule build --release -- --no-default-features --features="ckb2023" && \
cd tests && \
cargo test --no-default-features --features="ckb2023"

rust-demo-tests-only-dl: clean-rust-demo-tests
export PATH=$(shell pwd)/bin/:"$(PATH)" && \
cd auth-rust-lock && \
capsule build -- --no-default-features --features="enable-dynamic-library" && \
capsule build --release -- --no-default-features --features="enable-dynamic-library" && \
cd tests && \
cargo test --no-default-features --features="enable-dynamic-library"

Expand All @@ -86,7 +90,6 @@ install-all: \
install-ckb-tools: \
bin \
install-ckb-debugger \
install-moleculec \
install-capsule \
install-cross

Expand All @@ -100,9 +103,6 @@ else ifeq ($(shell uname),Linux)
rm -rf LICENSE ckb-debugger-linux-x64.tar.gz
endif

install-moleculec:
cargo install moleculec --version 0.7.3 --root ./

install-capsule:
ifeq ($(shell uname),Darwin)
cargo install ckb-capsule --version "0.10.2" --root ./
Expand Down
Loading

0 comments on commit 4253ba8

Please sign in to comment.