From c7981076938ea021e0a428ea897bd9a417736cfc Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Wed, 1 Mar 2023 21:23:03 +0000 Subject: [PATCH] For now, the top-level crate just re-exports the interpreter --- Cargo.lock | 2 +- hornbeam/Cargo.toml | 2 +- hornbeam/src/lib.rs | 22 +++++++++------------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b91c825..89f480f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -461,7 +461,7 @@ dependencies = [ name = "hornbeam" version = "0.1.0" dependencies = [ - "hornbeam_grammar", + "hornbeam_interpreter", ] [[package]] diff --git a/hornbeam/Cargo.toml b/hornbeam/Cargo.toml index e5eb475..4ab9ff1 100644 --- a/hornbeam/Cargo.toml +++ b/hornbeam/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] -hornbeam_grammar = { version = "0.1.0", path = "../hornbeam_grammar" } +hornbeam_interpreter = { version = "0.1.0", path = "../hornbeam_interpreter" } \ No newline at end of file diff --git a/hornbeam/src/lib.rs b/hornbeam/src/lib.rs index 7d12d9a..8a41768 100644 --- a/hornbeam/src/lib.rs +++ b/hornbeam/src/lib.rs @@ -1,14 +1,10 @@ -pub fn add(left: usize, right: usize) -> usize { - left + right -} +//! # TEMPORARY! +//! +//! This crate currently just re-exports all of `hornbeam_interpreter`. +//! +//! In the future, this crate will provide an abstraction layer over both the interpreter and +//! the compile-time template compiler, allowing to switch between them at will in a project +//! (or more likely: use the hot-reloadable interpreter in development and the high-performance +//! compiler for production). -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} +pub use hornbeam_interpreter::*;