Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten crate structure again #754

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
guest/target/
example/target/
ceno_rt/target/
key: integration-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@nightly

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
guest/target/
ceno_rt/target/
example/target/
key: lint-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: lint-${{ runner.os }}-cargo-

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
guest/target/
ceno_rt/target/
example/target/
key: tests-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: tests-${{ runner.os }}-cargo-

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
exclude = ["guest"]
exclude = ["ceno_rt", "examples"]
members = [
"ceno_emul",
"examples-builder",
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions ceno_rt/Cargo.lock

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

13 changes: 4 additions & 9 deletions guest/Cargo.toml → ceno_rt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
[workspace]
members = ["examples", "ceno_rt"]
resolver = "2"

[workspace.package]
[package]
categories = ["cryptography", "zk", "blockchain", "ceno"]
description = "Ceno runtime library"
edition = "2021"
keywords = ["cryptography", "zk", "blockchain", "ceno"]
license = "MIT OR Apache-2.0"
readme = "../README.md"
name = "ceno_rt"
readme = "README.md"
repository = "https://github.com/scroll-tech/ceno"
version = "0.1.0"

[profile.release]
lto = "thin"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions examples-builder/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn build_elfs() {
// See git history for an attempt to do this.
let output = Command::new("cargo")
.args(["build", "--release", "--examples"])
.current_dir("../guest/examples")
.current_dir("../examples")
.env_clear()
.envs(std::env::vars().filter(|x| !x.0.starts_with("CARGO_")))
.output()
Expand All @@ -41,13 +41,12 @@ fn build_elfs() {
dest,
r#"#[allow(non_upper_case_globals)]
pub const {example}: &[u8] =
include_bytes!(r"{CARGO_MANIFEST_DIR}/../guest/target/riscv32im-unknown-none-elf/release/examples/{example}");"#
include_bytes!(r"{CARGO_MANIFEST_DIR}/../examples/target/riscv32im-unknown-none-elf/release/examples/{example}");"#
).expect("failed to write vars.rs");
}
let input_path = "../guest/";
let elfs_path = "../guest/target/riscv32im-unknown-none-elf/release/examples/";

println!("cargo:rerun-if-changed={input_path}");
println!("cargo:rerun-if-changed=../examples/");
println!("cargo:rerun-if-changed=../ceno_rt/");
let elfs_path = "../examples/target/riscv32im-unknown-none-elf/release/examples/";
println!("cargo:rerun-if-changed={elfs_path}");
}

Expand Down
1 change: 1 addition & 0 deletions examples/.cargo/config.toml
File renamed without changes.
13 changes: 13 additions & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
categories = ["cryptography", "zk", "blockchain", "ceno"]
description = "Ceno RiscV guest examples"
edition = "2021"
keywords = ["cryptography", "zk", "blockchain", "ceno"]
license = "MIT OR Apache-2.0"
name = "examples"
readme = "README.md"
repository = "https://github.com/scroll-tech/ceno"
version = "0.1.0"

[dependencies]
ceno_rt = { path = "../ceno_rt" }
File renamed without changes.
10 changes: 0 additions & 10 deletions guest/ceno_rt/Cargo.toml

This file was deleted.

13 changes: 0 additions & 13 deletions guest/examples/Cargo.toml

This file was deleted.