Skip to content

Commit

Permalink
Completely remove the capsule and cross (nervosnetwork#107)
Browse files Browse the repository at this point in the history
* Remove capsule settings
* Update submodule
* Bump version to v0.16.0
* Make dummy-atomic as a default feature
  • Loading branch information
mohanson authored Sep 23, 2024
1 parent 1373f23 commit aaffc73
Show file tree
Hide file tree
Showing 26 changed files with 125 additions and 160 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/develop-rust.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Develop Clang
name: Develop

on:
pull_request:
Expand All @@ -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
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-std"
version = "0.15.3"
version = "0.16.0"
authors = ["Nervos network"]
edition = "2021"
license = "MIT"
Expand All @@ -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"]
Expand All @@ -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"]
Expand Down
5 changes: 0 additions & 5 deletions Cross.toml

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,6 +20,6 @@ test:
make -C test test

check:
cross check --target ${TARGET} --examples
cargo check --target ${TARGET} --examples

.PHONY: test check
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
35 changes: 0 additions & 35 deletions capsule.toml

This file was deleted.

48 changes: 39 additions & 9 deletions contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions contracts/Cross.toml

This file was deleted.

6 changes: 3 additions & 3 deletions contracts/ckb-std-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
2 changes: 1 addition & 1 deletion contracts/exec-callee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
44 changes: 37 additions & 7 deletions contracts/exec-callee/exec-callee-dbg/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions contracts/exec-callee/exec-callee-dbg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
[workspace]
2 changes: 1 addition & 1 deletion contracts/exec-caller-by-code-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Loading

0 comments on commit aaffc73

Please sign in to comment.