Skip to content

Commit

Permalink
remove runtime crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Alt committed Jan 23, 2024
1 parent bb2972c commit 5cfc240
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 277 deletions.
10 changes: 0 additions & 10 deletions riscv/runtime/Cargo.toml

This file was deleted.

4 changes: 0 additions & 4 deletions riscv/runtime/rust-toolchain.toml

This file was deleted.

72 changes: 0 additions & 72 deletions riscv/runtime/src/allocator.rs

This file was deleted.

51 changes: 0 additions & 51 deletions riscv/runtime/src/coprocessors.rs

This file was deleted.

40 changes: 0 additions & 40 deletions riscv/runtime/src/fmt.rs

This file was deleted.

52 changes: 0 additions & 52 deletions riscv/runtime/src/lib.rs

This file was deleted.

39 changes: 1 addition & 38 deletions riscv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
runtime = {{ path = "./runtime" }}
powdr-riscv-runtime = {{ git = "https://github.com/powdr-labs/powdr", branch = "main" }}
"#,
Path::new(input_file).file_stem().unwrap().to_str().unwrap()
),
Expand All @@ -165,43 +165,6 @@ runtime = {{ path = "./runtime" }}
src_file.push("lib.rs");
fs::write(src_file, fs::read_to_string(input_file).unwrap()).unwrap();

let mut runtime_file = crate_dir.clone();
runtime_file.push("runtime");
fs::create_dir_all(&runtime_file).unwrap();
let mut cargo_file_runtime = runtime_file.clone();
cargo_file_runtime.push("Cargo.toml");
fs::write(
cargo_file_runtime.clone(),
include_bytes!("../runtime/Cargo.toml"),
)
.unwrap();
runtime_file.push("src");
fs::create_dir(&runtime_file).unwrap();

let mut lib_file = runtime_file.clone();
lib_file.push("lib.rs");
fs::write(lib_file, include_bytes!("../runtime/src/lib.rs")).unwrap();

let mut allocator_file = runtime_file.clone();
allocator_file.push("allocator.rs");
fs::write(
allocator_file,
include_bytes!("../runtime/src/allocator.rs"),
)
.unwrap();

let mut fmt_file = runtime_file.clone();
fmt_file.push("fmt.rs");
fs::write(fmt_file, include_bytes!("../runtime/src/fmt.rs")).unwrap();

let mut coprocessors_file = runtime_file.clone();
coprocessors_file.push("coprocessors.rs");
fs::write(
coprocessors_file,
include_bytes!("../runtime/src/coprocessors.rs"),
)
.unwrap();

compile_rust_crate_to_riscv_asm(cargo_file.to_str().unwrap(), output_dir)
}

Expand Down
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/byte_access.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_std]

use runtime::get_prover_input;
use powdr_riscv_runtime::get_prover_input;

const X: &'static str = "abcdefg";

Expand Down
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/double_word.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_std]

use runtime::get_prover_input;
use powdr_riscv_runtime::get_prover_input;

#[no_mangle]
pub fn main() {
Expand Down
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/keccak/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2021"

[dependencies]
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
runtime = { path = "../../../runtime" }
powdr-riscv-runtime = { path = "../../../../riscv-runtime" }

[workspace]
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/memfuncs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
runtime = { path = "../../../runtime" }
powdr-riscv-runtime = { path = "../../../../riscv-runtime" }

[workspace]
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/password_checker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
runtime = { path = "../../../runtime" }
powdr-riscv-runtime = { path = "../../../../riscv-runtime" }

[workspace]
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/poseidon_gl_via_coprocessor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_std]

use runtime::coprocessors::{poseidon_gl, poseidon_gl_unsafe};
use powdr_riscv_runtime::coprocessors::{poseidon_gl, poseidon_gl_unsafe};

#[no_mangle]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/print.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_std]

use runtime::{get_prover_input, print};
use powdr_riscv_runtime::{get_prover_input, print};

#[no_mangle]
pub fn main() {
Expand Down
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extern crate alloc;
use alloc::vec::Vec;

use runtime::get_prover_input;
use powdr_riscv_runtime::get_prover_input;

#[no_mangle]
pub fn main() {
Expand Down
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/vec_median/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2021"

[dependencies]
runtime = { path = "../../../runtime" }
powdr-riscv-runtime = { path = "../../../../riscv-runtime" }

[workspace]
2 changes: 1 addition & 1 deletion riscv/tests/riscv_data/vec_median/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
extern crate alloc;

use alloc::vec::Vec;
use runtime::{get_prover_input, print};
use powdr_riscv_rt::{get_prover_input, print};

#[no_mangle]
fn main() {
Expand Down

0 comments on commit 5cfc240

Please sign in to comment.