From aaffc73d490aa7bd14a886b29c74844430f7040e Mon Sep 17 00:00:00 2001 From: Mohanson Date: Mon, 23 Sep 2024 14:10:08 +0800 Subject: [PATCH] Completely remove the capsule and cross (#107) * Remove capsule settings * Update submodule * Bump version to v0.16.0 * Make dummy-atomic as a default feature --- .github/workflows/develop-rust.yml | 23 --------- .../{develop-clang.yml => develop.yml} | 6 +-- .github/workflows/release.yml | 1 + Cargo.toml | 14 +++--- Cross.toml | 5 -- Makefile | 6 +-- build.rs | 2 +- c/ckb-c-stdlib | 2 +- capsule.toml | 35 -------------- contracts/Cargo.lock | 48 +++++++++++++++---- contracts/Cross.toml | 5 -- contracts/ckb-std-tests/Cargo.toml | 6 +-- contracts/exec-callee/Cargo.toml | 2 +- .../exec-callee/exec-callee-dbg/Cargo.lock | 44 ++++++++++++++--- .../exec-callee/exec-callee-dbg/Cargo.toml | 4 +- contracts/exec-caller-by-code-hash/Cargo.toml | 2 +- contracts/exec-caller/Cargo.toml | 2 +- contracts/spawn-callee/Cargo.toml | 2 +- .../spawn-caller-by-code-hash/Cargo.toml | 2 +- contracts/spawn-caller/Cargo.toml | 2 +- deployment.toml | 27 ----------- src/syscalls/simulator.rs | 28 +++++------ test/Makefile | 3 +- test/simulator/Cargo.toml | 4 +- test/src/contract.rs | 2 +- test/src/exec.rs | 8 ++-- 26 files changed, 125 insertions(+), 160 deletions(-) delete mode 100644 .github/workflows/develop-rust.yml rename .github/workflows/{develop-clang.yml => develop.yml} (69%) delete mode 100644 Cross.toml delete mode 100644 capsule.toml delete mode 100644 contracts/Cross.toml delete mode 100644 deployment.toml diff --git a/.github/workflows/develop-rust.yml b/.github/workflows/develop-rust.yml deleted file mode 100644 index 3383503..0000000 --- a/.github/workflows/develop-rust.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Develop Rust - -on: - pull_request: - push: - -jobs: - develop: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Deps - run: | - rustup target add riscv64imac-unknown-none-elf - cargo install cross --git https://github.com/cross-rs/cross --rev=6982b6c - cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule --rev 5c1b2ce - - name: Test - run: | - cargo build --target=riscv64imac-unknown-none-elf --no-default-features --features=ckb-types,allocator - cross check --examples - make test diff --git a/.github/workflows/develop-clang.yml b/.github/workflows/develop.yml similarity index 69% rename from .github/workflows/develop-clang.yml rename to .github/workflows/develop.yml index aeeb876..7109be4 100644 --- a/.github/workflows/develop-clang.yml +++ b/.github/workflows/develop.yml @@ -1,4 +1,4 @@ -name: Develop Clang +name: Develop on: pull_request: @@ -14,7 +14,7 @@ jobs: - name: Deps run: | rustup target add riscv64imac-unknown-none-elf - wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && rm llvm.sh + wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18 && rm llvm.sh - name: Test run: | - cargo build --verbose --target=riscv64imac-unknown-none-elf --features=build-with-clang + make test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63855cf..a3361a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: - name: Deps run: | rustup target add riscv64imac-unknown-none-elf + wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18 && rm llvm.sh - name: Push run: | cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index 845eec2..2a94f70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-std" -version = "0.15.3" +version = "0.16.0" authors = ["Nervos network"] edition = "2021" license = "MIT" @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -default = ["allocator", "ckb-types", "libc", "calc-hash"] +default = ["allocator", "calc-hash", "ckb-types", "dummy-atomic", "libc"] calc-hash = ["ckb-types/calc-hash"] allocator = ["buddy-alloc"] native-simulator = ["ckb-x64-simulator"] @@ -31,11 +31,11 @@ log = ["dep:log", "dummy-atomic"] cc = "1.0" [dependencies] -ckb-types = { package = "ckb-gen-types", version = "0.116", default-features = false, optional = true } -buddy-alloc = { version = "0.5.0", optional = true } -ckb-x64-simulator = { version = "0.9.1", optional = true } -gcd = "2.3.0" -log = { version = "0.4.21", optional = true, default-features = false } +ckb-types = { package = "ckb-gen-types", version = "0.118", default-features = false, optional = true } +buddy-alloc = { version = "0.5", optional = true } +ckb-x64-simulator = { version = "0.9", optional = true } +gcd = "2.3" +log = { version = "0.4", optional = true, default-features = false } [workspace] exclude = ["test"] diff --git a/Cross.toml b/Cross.toml deleted file mode 100644 index 278f31b..0000000 --- a/Cross.toml +++ /dev/null @@ -1,5 +0,0 @@ -[build] -default-target = "riscv64imac-unknown-none-elf" - -[target.riscv64imac-unknown-none-elf] -image = "nervos/ckb-riscv-gnu-toolchain:focal-20230214" diff --git a/Makefile b/Makefile index 61dfd41..8e67093 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,12 @@ CC := riscv64-unknown-elf-gcc default: integration publish-crate: - cross publish -p ckb-std + cargo publish -p ckb-std publish: publish-crate clean: - cross clean && make -C test clean + cargo clean && make -C test clean test-shared-lib: make -C test/shared-lib all-via-docker @@ -20,6 +20,6 @@ test: make -C test test check: - cross check --target ${TARGET} --examples + cargo check --target ${TARGET} --examples .PHONY: test check diff --git a/build.rs b/build.rs index 28a8bb4..260e7ac 100644 --- a/build.rs +++ b/build.rs @@ -48,7 +48,7 @@ fn setup_compiler_flags(build: &mut cc::Build) { let clang = match std::env::var_os("CLANG") { Some(val) => val, - None => "clang-16".into(), + None => "clang-18".into(), }; if cfg!(feature = "build-with-clang") { diff --git a/c/ckb-c-stdlib b/c/ckb-c-stdlib index be84dcf..744c62e 160000 --- a/c/ckb-c-stdlib +++ b/c/ckb-c-stdlib @@ -1 +1 @@ -Subproject commit be84dcf385ddc2ab52b2650fb959e3769dc75093 +Subproject commit 744c62e5259a5ab826e1a02ca36a811c9905f010 diff --git a/capsule.toml b/capsule.toml deleted file mode 100644 index 686c0bc..0000000 --- a/capsule.toml +++ /dev/null @@ -1,35 +0,0 @@ -# capsule version -version = "0.10.0" -# path of deployment config file -deployment = "deployment.toml" - -[rust] -workspace_dir = "contracts" - -[[contracts]] -name = "ckb-std-tests" -template_type = "Rust" - -[[contracts]] -name = "exec-callee" -template_type = "Rust" - -[[contracts]] -name = "exec-caller" -template_type = "Rust" - -[[contracts]] -name = "exec-caller-by-code-hash" -template_type = "Rust" - -[[contracts]] -name = "spawn-caller" -template_type = "Rust" - -[[contracts]] -name = "spawn-caller-by-code-hash" -template_type = "Rust" - -[[contracts]] -name = "spawn-callee" -template_type = "Rust" diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index 2cece48..fd25ed9 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -38,9 +38,9 @@ checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -130,12 +130,23 @@ dependencies = [ "cfg-if", "ckb-error", "ckb-fixed-hash", - "ckb-hash", + "ckb-hash 0.116.1", "ckb-occupied-capacity", - "molecule", + "molecule 0.7.5", "numext-fixed-uint", ] +[[package]] +name = "ckb-gen-types" +version = "0.118.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7891f62f4ae4f018bfde91a46178c78491a1dfee740a20b994003a23f10af" +dependencies = [ + "cfg-if", + "ckb-hash 0.118.0", + "molecule 0.8.0", +] + [[package]] name = "ckb-hash" version = "0.116.1" @@ -146,6 +157,15 @@ dependencies = [ "blake2b-rs", ] +[[package]] +name = "ckb-hash" +version = "0.118.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b7aec74956ae5e79d0fc68e5903dc2b133c2c64644514485bbc9feb5367eb" +dependencies = [ + "blake2b-ref", +] + [[package]] name = "ckb-jsonrpc-types" version = "0.116.1" @@ -222,11 +242,11 @@ dependencies = [ [[package]] name = "ckb-std" -version = "0.15.3" +version = "0.16.0" dependencies = [ "buddy-alloc", "cc", - "ckb-gen-types", + "ckb-gen-types 0.118.0", "ckb-x64-simulator", "gcd", "log", @@ -263,15 +283,15 @@ dependencies = [ "ckb-constant", "ckb-error", "ckb-fixed-hash", - "ckb-gen-types", - "ckb-hash", + "ckb-gen-types 0.116.1", + "ckb-hash 0.116.1", "ckb-merkle-mountain-range", "ckb-occupied-capacity", "ckb-rational", "derive_more", "golomb-coded-set", "merkle-cbt", - "molecule", + "molecule 0.7.5", "numext-fixed-uint", "once_cell", "paste", @@ -473,6 +493,16 @@ dependencies = [ "faster-hex", ] +[[package]] +name = "molecule" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6efe1c7efcd0bdf4ca590e104bcb13087d9968956ae4ae98e92fb8c1da0f3730" +dependencies = [ + "bytes", + "cfg-if", +] + [[package]] name = "numext-constructor" version = "0.1.6" diff --git a/contracts/Cross.toml b/contracts/Cross.toml deleted file mode 100644 index 278f31b..0000000 --- a/contracts/Cross.toml +++ /dev/null @@ -1,5 +0,0 @@ -[build] -default-target = "riscv64imac-unknown-none-elf" - -[target.riscv64imac-unknown-none-elf] -image = "nervos/ckb-riscv-gnu-toolchain:focal-20230214" diff --git a/contracts/ckb-std-tests/Cargo.toml b/contracts/ckb-std-tests/Cargo.toml index fd571ec..94211c0 100644 --- a/contracts/ckb-std-tests/Cargo.toml +++ b/contracts/ckb-std-tests/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = { path = "../../", features = [ "dlopen-c", "dummy-atomic", "log"] } +ckb-std = { path = "../../", features = ["build-with-clang", "dlopen-c", "log"] } blake2b-ref = { version = "0.3", default-features = false } -bytes = { version = "1.6.0", default-features = false } -log = { version = "0.4.17", default-features = false } +bytes = { version = "1.7", default-features = false } +log = { version = "0.4", default-features = false } diff --git a/contracts/exec-callee/Cargo.toml b/contracts/exec-callee/Cargo.toml index a6fc783..a6fbaef 100644 --- a/contracts/exec-callee/Cargo.toml +++ b/contracts/exec-callee/Cargo.toml @@ -9,4 +9,4 @@ edition = "2018" native-simulator = ["ckb-std/native-simulator"] [dependencies] -ckb-std = { path = "../../" } +ckb-std = { path = "../../", default-features=false, features=["allocator", "build-with-clang", "calc-hash", "ckb-types", "libc"] } diff --git a/contracts/exec-callee/exec-callee-dbg/Cargo.lock b/contracts/exec-callee/exec-callee-dbg/Cargo.lock index c59d481..2480d96 100644 --- a/contracts/exec-callee/exec-callee-dbg/Cargo.lock +++ b/contracts/exec-callee/exec-callee-dbg/Cargo.lock @@ -127,12 +127,23 @@ dependencies = [ "cfg-if", "ckb-error", "ckb-fixed-hash", - "ckb-hash", + "ckb-hash 0.116.1", "ckb-occupied-capacity", - "molecule", + "molecule 0.7.5", "numext-fixed-uint", ] +[[package]] +name = "ckb-gen-types" +version = "0.118.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7891f62f4ae4f018bfde91a46178c78491a1dfee740a20b994003a23f10af" +dependencies = [ + "cfg-if", + "ckb-hash 0.118.0", + "molecule 0.8.0", +] + [[package]] name = "ckb-hash" version = "0.116.1" @@ -143,6 +154,15 @@ dependencies = [ "blake2b-rs", ] +[[package]] +name = "ckb-hash" +version = "0.118.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b7aec74956ae5e79d0fc68e5903dc2b133c2c64644514485bbc9feb5367eb" +dependencies = [ + "blake2b-ref", +] + [[package]] name = "ckb-jsonrpc-types" version = "0.116.1" @@ -219,11 +239,11 @@ dependencies = [ [[package]] name = "ckb-std" -version = "0.15.3" +version = "0.16.0" dependencies = [ "buddy-alloc", "cc", - "ckb-gen-types", + "ckb-gen-types 0.118.0", "ckb-x64-simulator", "gcd", ] @@ -249,15 +269,15 @@ dependencies = [ "ckb-constant", "ckb-error", "ckb-fixed-hash", - "ckb-gen-types", - "ckb-hash", + "ckb-gen-types 0.116.1", + "ckb-hash 0.116.1", "ckb-merkle-mountain-range", "ckb-occupied-capacity", "ckb-rational", "derive_more", "golomb-coded-set", "merkle-cbt", - "molecule", + "molecule 0.7.5", "numext-fixed-uint", "once_cell", "paste", @@ -447,6 +467,16 @@ dependencies = [ "faster-hex", ] +[[package]] +name = "molecule" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6efe1c7efcd0bdf4ca590e104bcb13087d9968956ae4ae98e92fb8c1da0f3730" +dependencies = [ + "bytes", + "cfg-if", +] + [[package]] name = "numext-constructor" version = "0.1.6" diff --git a/contracts/exec-callee/exec-callee-dbg/Cargo.toml b/contracts/exec-callee/exec-callee-dbg/Cargo.toml index a644a8e..d096591 100644 --- a/contracts/exec-callee/exec-callee-dbg/Cargo.toml +++ b/contracts/exec-callee/exec-callee-dbg/Cargo.toml @@ -6,9 +6,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] exec-callee = { path = "../", features = ["native-simulator"] } -ckb-std = { path = "../../../", features = ["native-simulator"] } +ckb-std = { path = "../../../", default-features=false, features = ["allocator", "build-with-clang", "calc-hash", "ckb-types", "libc", "native-simulator"] } [lib] crate-type = ["cdylib"] -[workspace] \ No newline at end of file +[workspace] diff --git a/contracts/exec-caller-by-code-hash/Cargo.toml b/contracts/exec-caller-by-code-hash/Cargo.toml index 69f6076..1854af0 100644 --- a/contracts/exec-caller-by-code-hash/Cargo.toml +++ b/contracts/exec-caller-by-code-hash/Cargo.toml @@ -6,4 +6,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = { path = "../../" } +ckb-std = { path = "../../", features=["build-with-clang"] } diff --git a/contracts/exec-caller/Cargo.toml b/contracts/exec-caller/Cargo.toml index 803ede9..a5c0ce2 100644 --- a/contracts/exec-caller/Cargo.toml +++ b/contracts/exec-caller/Cargo.toml @@ -6,4 +6,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = { path = "../../" } +ckb-std = { path = "../../", features=["build-with-clang"] } diff --git a/contracts/spawn-callee/Cargo.toml b/contracts/spawn-callee/Cargo.toml index 60d771e..c13264a 100644 --- a/contracts/spawn-callee/Cargo.toml +++ b/contracts/spawn-callee/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = { path = "../../" } +ckb-std = { path = "../../", features=["build-with-clang"] } diff --git a/contracts/spawn-caller-by-code-hash/Cargo.toml b/contracts/spawn-caller-by-code-hash/Cargo.toml index cf5b834..4659eeb 100644 --- a/contracts/spawn-caller-by-code-hash/Cargo.toml +++ b/contracts/spawn-caller-by-code-hash/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = { path = "../../" } +ckb-std = { path = "../../", features=["build-with-clang"] } diff --git a/contracts/spawn-caller/Cargo.toml b/contracts/spawn-caller/Cargo.toml index af1c69b..3964a99 100644 --- a/contracts/spawn-caller/Cargo.toml +++ b/contracts/spawn-caller/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = { path = "../../" } +ckb-std = { path = "../../", features=["build-with-clang"] } diff --git a/deployment.toml b/deployment.toml deleted file mode 100644 index 62d23d4..0000000 --- a/deployment.toml +++ /dev/null @@ -1,27 +0,0 @@ -# [[cells]] -# name = "my_cell" -# enable_type_id = false -# location = { file = "build/release/my_cell" } -# -# # reference to on-chain cells -# [[cells]] -# name = "genesis_cell" -# enable_type_id = false -# location = { tx_hash = "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c", index = 0 } - - -# # Dep group cells -# [[dep_groups]] -# name = "my_dep_group" -# cells = [ -# "my_cell", -# "genesis_cell" -# ] - -# # Replace with your own lock if you want to unlock deployed cells. -# # For example the secp256k1 lock -# [lock] -# code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" -# args = "0x0000000000000000000000000000000000000000" -# hash_type = "type" - diff --git a/src/syscalls/simulator.rs b/src/syscalls/simulator.rs index 40cbfd4..97cdf45 100644 --- a/src/syscalls/simulator.rs +++ b/src/syscalls/simulator.rs @@ -271,16 +271,16 @@ pub struct SpawnArgs { } pub fn spawn( - index: usize, - source: Source, - place: usize, - bounds: usize, - spgs: &mut SpawnArgs, + _index: usize, + _source: Source, + _place: usize, + _bounds: usize, + _spgs: &mut SpawnArgs, ) -> Result { panic!("This is not supported in the native-simulator!"); } -pub fn wait(pid: u64) -> Result { +pub fn wait(_pid: u64) -> Result { panic!("This is not supported in the native-simulator!"); } @@ -292,27 +292,27 @@ pub fn pipe() -> Result<(u64, u64), SysError> { panic!("This is not supported in the native-simulator!"); } -pub fn read(fd: u64, buffer: &mut [u8]) -> Result { +pub fn read(_fd: u64, _buffer: &mut [u8]) -> Result { panic!("This is not supported in the native-simulator!"); } -pub fn write(fd: u64, buffer: &[u8]) -> Result { +pub fn write(_fd: u64, _buffer: &[u8]) -> Result { panic!("This is not supported in the native-simulator!"); } -pub fn inherited_fds(fds: &mut [u64]) { +pub fn inherited_fds(_fds: &mut [u64]) { panic!("This is not supported in the native-simulator!"); } -pub fn close(fd: u64) -> Result<(), SysError> { +pub fn close(_fd: u64) -> Result<(), SysError> { panic!("This is not supported in the native-simulator!"); } pub fn load_block_extension( - buf: &mut [u8], - offset: usize, - index: usize, - source: Source, + _buf: &mut [u8], + _offset: usize, + _index: usize, + _source: Source, ) -> Result { panic!("This is not supported in the native-simulator!"); } diff --git a/test/Makefile b/test/Makefile index 848af04..6d98db8 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,8 +6,7 @@ test: build build: make -C shared-lib all-via-docker - cd .. && capsule build - cd .. && RUSTFLAGS="-C target-feature=-a" capsule build -n ckb-std-tests + cd ../contracts && RUSTFLAGS="-C target-feature=-a" cargo build --target riscv64imac-unknown-none-elf clean: rm -rf ../build diff --git a/test/simulator/Cargo.toml b/test/simulator/Cargo.toml index b35fd86..e217cd0 100644 --- a/test/simulator/Cargo.toml +++ b/test/simulator/Cargo.toml @@ -16,10 +16,10 @@ name = "exec-callee" path = "src/exec_callee.rs" [dependencies] -ckb-std = { path = "../..", features = ["ckb-types", "native-simulator"] } +ckb-std = { path = "../..", default-features=false, features = ["allocator", "calc-hash", "ckb-types", "libc", "native-simulator"] } blake2b-ref = { version = "0.3", default-features = false } bytes = { version = "1.6.0", default-features = false } log = { version = "0.4.17", default-features = false } [dev-dependencies] -libloading = "0.8.4" \ No newline at end of file +libloading = "0.8.4" diff --git a/test/src/contract.rs b/test/src/contract.rs index 7d34601..a7bbd2c 100644 --- a/test/src/contract.rs +++ b/test/src/contract.rs @@ -14,7 +14,7 @@ fn it_works() { let mut context = Context::default(); let contract_bin = { let mut buf = Vec::new(); - File::open("../build/debug/ckb-std-tests") + File::open("../contracts/target/riscv64imac-unknown-none-elf/debug/ckb-std-tests") .unwrap() .read_to_end(&mut buf) .expect("read code"); diff --git a/test/src/exec.rs b/test/src/exec.rs index 3e181a9..3844d19 100644 --- a/test/src/exec.rs +++ b/test/src/exec.rs @@ -21,7 +21,7 @@ fn test_exec_by_index() { let mut context = Context::default(); let caller_bin = { let mut buf = Vec::new(); - File::open("../build/debug/exec-caller") + File::open("../contracts/target/riscv64imac-unknown-none-elf/debug/exec-caller") .unwrap() .read_to_end(&mut buf) .expect("read code"); @@ -30,7 +30,7 @@ fn test_exec_by_index() { let caller_out_point = context.deploy_cell(caller_bin); let callee_bin = { let mut buf = Vec::new(); - File::open("../build/debug/exec-callee") + File::open("../contracts/target/riscv64imac-unknown-none-elf/debug/exec-callee") .unwrap() .read_to_end(&mut buf) .expect("read code"); @@ -84,7 +84,7 @@ fn test_exec_by_code_hash() { let mut context = Context::default(); let caller_bin = { let mut buf = Vec::new(); - File::open("../build/debug/exec-caller-by-code-hash") + File::open("../contracts/target/riscv64imac-unknown-none-elf/debug/exec-caller-by-code-hash") .unwrap() .read_to_end(&mut buf) .expect("read code"); @@ -93,7 +93,7 @@ fn test_exec_by_code_hash() { let caller_out_point = context.deploy_cell(caller_bin); let callee_bin = { let mut buf = Vec::new(); - File::open("../build/debug/exec-callee") + File::open("../contracts/target/riscv64imac-unknown-none-elf/debug/exec-callee") .unwrap() .read_to_end(&mut buf) .expect("read code");