split real out into its own crate

this is a move toward reusing some of the coremem helper types in the
spirv backend.
This commit is contained in:
2022-07-17 17:32:35 -07:00
parent ac3895c432
commit 9d102e0152
8 changed files with 23 additions and 4 deletions

10
Cargo.lock generated
View File

@@ -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"

View File

@@ -5,6 +5,7 @@ members = [
"crates/spirv_backend",
"crates/spirv_backend_builder",
"crates/spirv_backend_runner",
"crates/types",
"crates/post",
"crates/applications/buffer_proto5",

View File

@@ -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]

View File

@@ -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

View File

@@ -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::*;

9
crates/types/Cargo.toml Normal file
View File

@@ -0,0 +1,9 @@
[package]
name = "coremem_types"
version = "0.1.0"
authors = ["Colin <colin@uninsane.org>"]
edition = "2021"
[dependencies]
num = "0.4" # MIT or Apache 2.0
decorum = "0.3" # MIT

1
crates/types/src/lib.rs Normal file
View File

@@ -0,0 +1 @@
pub mod real;