Skip to content

Commit

Permalink
[framework] Migrate all stdlib and framework to frameworks dir (rooch…
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar authored Apr 8, 2024
1 parent 93ea732 commit 8d85e68
Show file tree
Hide file tree
Showing 324 changed files with 333 additions and 294 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Build
run: cargo build
- name: Framework compatibiliy
run: cargo run --package rooch-framework-release --bin rooch-framework-release
run: cargo run --package framework-release --bin framework-release
- name: Execute rust tests
run: cargo nextest run --workspace --all-features --exclude rooch-framework-tests --exclude rooch-integration-test-runner -v
- name: Execute the framework test with 1 thread
Expand Down
124 changes: 62 additions & 62 deletions Cargo.lock

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

16 changes: 9 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ members = [
"moveos/smt",
"moveos/moveos-types",
"moveos/moveos-store",
"moveos/moveos-stdlib",
"moveos/moveos-stdlib-builder",
"moveos/moveos",
"moveos/moveos-commons/moveos-common",
"moveos/moveos-commons/timeout-join-handler",
Expand All @@ -18,9 +16,7 @@ members = [
"moveos/moveos-object-runtime",
"crates/rooch-key",
"crates/rooch-types",
"crates/rooch-framework",
"crates/rooch-framework-tests",
"crates/rooch-framework-release",
"crates/rooch-genesis",
"crates/rooch-genesis-builder",
"crates/rooch-integration-test-runner",
Expand All @@ -45,6 +41,10 @@ members = [
"crates/rooch-benchmarks",
"crates/rooch-test-transaction-builder",
"crates/data_verify",
"frameworks/framework-builder",
"frameworks/framework-release",
"frameworks/moveos-stdlib",
"frameworks/rooch-framework",
"frameworks/bitcoin-move"
]

Expand Down Expand Up @@ -72,8 +72,6 @@ rust-version = "1.70"
smt = { path = "moveos/smt" }
moveos-types = { path = "moveos/moveos-types" }
moveos-store = { path = "moveos/moveos-store" }
moveos-stdlib = { path = "moveos/moveos-stdlib" }
moveos-stdlib-builder = { path = "moveos/moveos-stdlib-builder" }
moveos = { path = "moveos/moveos" }
moveos-cli = { path = "moveos/moveos-cli" }
moveos-common = { path = "moveos/moveos-commons/moveos-common" }
Expand All @@ -89,7 +87,6 @@ moveos-object-runtime = { path = "moveos/moveos-object-runtime" }
rooch = { path = "crates/rooch" }
rooch-key = { path = "crates/rooch-key" }
rooch-types = { path = "crates/rooch-types" }
rooch-framework = { path = "crates/rooch-framework" }
rooch-framework-tests = { path = "crates/rooch-framework-tests" }
rooch-integration-test-runner = { path = "crates/rooch-integration-test-runner" }
rooch-genesis = { path = "crates/rooch-genesis" }
Expand All @@ -116,8 +113,13 @@ rooch-test-transaction-builder = { path = "crates/rooch-test-transaction-builder
data-verify = { path = "crates/data_verify" }

# frameworks
framework-builder = { path = "frameworks/framework-builder" }
framework-release = { path = "frameworks/framework-release" }
moveos-stdlib = { path = "frameworks/moveos-stdlib" }
rooch-framework = { path = "frameworks/rooch-framework" }
bitcoin-move = { path = "frameworks/bitcoin-move" }


# External crate dependencies.
# Please do not add any test features here: they should be declared by the individual crate.
again = "0.1.2"
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ Please refer to [Connect to Developer Test Network](https://rooch.network/build/

## MoveStd & MoveosStd & RoochFramework documentation

* std: 0x1 [MoveStdlib](./moveos/moveos-stdlib/move-stdlib/doc)
* moveos_std: 0x2 [MoveosStdlib](./moveos/moveos-stdlib/moveos-stdlib/doc)
* rooch_framework: 0x3 [RoochFramework](./crates/rooch-framework/doc/)
* std: 0x1 [MoveStdlib](./frameworks/move-stdlib/doc)
* moveos_std: 0x2 [MoveosStdlib](./frameworks/moveos-stdlib/doc)
* rooch_framework: 0x3 [RoochFramework](./frameworks/rooch-framework/doc/)
* bitcoin_move: 0x4 [BitcoinMove](./frameworks/bitcoin-move/doc/)

Please refer to [Rooch's built-in library](https://rooch.network/learn/core-concepts/move-contracts/built-in-library) for more information.

Expand Down
2 changes: 1 addition & 1 deletion crates/rooch-genesis-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ move-prover = { workspace = true }
moveos-types = { workspace = true }
moveos-verifier = { workspace = true }
moveos-stdlib = { workspace = true }
moveos-stdlib-builder = { workspace = true }
framework-builder = { workspace = true }
moveos = { workspace = true }
moveos-store = { workspace = true }

Expand Down
10 changes: 5 additions & 5 deletions crates/rooch-genesis-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
use std::path::{Path, PathBuf};

use anyhow::Result;
use framework_builder::{Stdlib, StdlibBuildConfig};
use move_package::BuildConfig;
use moveos_stdlib_builder::{Stdlib, StdlibBuildConfig};
use once_cell::sync::Lazy;

static STDLIB_BUILD_CONFIGS: Lazy<Vec<StdlibBuildConfig>> = Lazy::new(|| {
let move_stdlib_path = path_in_crate("../../moveos/moveos-stdlib/move-stdlib")
let move_stdlib_path = path_in_crate("../../frameworks/move-stdlib")
.canonicalize()
.expect("canonicalize path failed");
let moveos_stdlib_path = path_in_crate("../../moveos/moveos-stdlib/moveos-stdlib")
let moveos_stdlib_path = path_in_crate("../../frameworks/moveos-stdlib")
.canonicalize()
.expect("canonicalize path failed");
let rooch_framework_path = path_in_crate("../rooch-framework")
let rooch_framework_path = path_in_crate("../../frameworks/rooch-framework")
.canonicalize()
.expect("canonicalize path failed");

Expand Down Expand Up @@ -62,7 +62,7 @@ static STDLIB_BUILD_CONFIGS: Lazy<Vec<StdlibBuildConfig>> = Lazy::new(|| {
});

pub fn build_stdlib() -> Result<Stdlib> {
moveos_stdlib_builder::Stdlib::build(STDLIB_BUILD_CONFIGS.clone())
framework_builder::Stdlib::build(STDLIB_BUILD_CONFIGS.clone())
}

pub fn build_and_save_stdlib() -> Result<()> {
Expand Down
Loading

0 comments on commit 8d85e68

Please sign in to comment.