diff --git a/Cargo.lock b/Cargo.lock index c412e31..d715c25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -320,11 +320,11 @@ version = "0.1.0" dependencies = [ "bincode", "common_macros", + "coremem_types", "criterion", "crossterm", "csv", "dashmap", - "decorum", "dyn-clone", "enum_dispatch", "env_logger", @@ -367,6 +367,14 @@ dependencies = [ "structopt", ] +[[package]] +name = "coremem_types" +version = "0.1.0" +dependencies = [ + "decorum", + "num", +] + [[package]] name = "crc32fast" version = "1.3.2" diff --git a/Cargo.toml b/Cargo.toml index 1c9fccc..65cefe1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "crates/spirv_backend", "crates/spirv_backend_builder", "crates/spirv_backend_runner", + "crates/types", "crates/post", "crates/applications/buffer_proto5", diff --git a/crates/coremem/Cargo.toml b/crates/coremem/Cargo.toml index 7c001bb..16d3223 100644 --- a/crates/coremem/Cargo.toml +++ b/crates/coremem/Cargo.toml @@ -15,7 +15,6 @@ common_macros = "0.1" # MIT or Apache 2.0 crossterm = "0.24" # MIT csv = "1.1" # MIT or Unlicense dashmap = "5.3" # MIT -decorum = "0.3" # MIT dyn-clone = "1.0" # MIT or Apache 2.0 enum_dispatch = "0.3" # MIT or Apache 2.0 env_logger = "0.9" # MIT or Apache 2.0 @@ -48,6 +47,7 @@ spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu" } spirv-std-macros = { git = "https://github.com/EmbarkStudios/rust-gpu" } spirv_backend = { path = "../spirv_backend" } spirv_backend_runner = { path = "../spirv_backend_runner" } +coremem_types = { path = "../types" } [dev-dependencies] diff --git a/crates/coremem/src/lib.rs b/crates/coremem/src/lib.rs index 78f0ed6..a030317 100644 --- a/crates/coremem/src/lib.rs +++ b/crates/coremem/src/lib.rs @@ -11,7 +11,6 @@ pub mod driver; pub mod geom; pub mod mat; pub mod meas; -pub mod real; pub mod render; pub mod sim; pub mod stim; @@ -20,6 +19,7 @@ pub mod util; pub use driver::*; pub use mat::*; pub use sim::*; +pub use coremem_types::real; // Some things to keep in mind: // B = mu_r*H + M diff --git a/crates/coremem/src/render.rs b/crates/coremem/src/render.rs index 0df03f7..c4177e7 100644 --- a/crates/coremem/src/render.rs +++ b/crates/coremem/src/render.rs @@ -6,7 +6,7 @@ use crossterm::{cursor, QueueableCommand as _}; use crossterm::style::{style, Color, PrintStyledContent, Stylize as _}; use font8x8::{BASIC_FONTS, GREEK_FONTS, UnicodeFonts as _}; use log::trace; -use num::integer::Integer; +use num::integer::Integer; // TODO: remove? use image::{RgbImage, Rgb}; use imageproc::{pixelops, drawing}; use rayon::prelude::*; diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml new file mode 100644 index 0000000..c4cccf6 --- /dev/null +++ b/crates/types/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "coremem_types" +version = "0.1.0" +authors = ["Colin "] +edition = "2021" + +[dependencies] +num = "0.4" # MIT or Apache 2.0 +decorum = "0.3" # MIT diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs new file mode 100644 index 0000000..69d116d --- /dev/null +++ b/crates/types/src/lib.rs @@ -0,0 +1 @@ +pub mod real; diff --git a/crates/coremem/src/real.rs b/crates/types/src/real.rs similarity index 100% rename from crates/coremem/src/real.rs rename to crates/types/src/real.rs