From d96b3ef29df9b3df770026c220849725215ab5d2 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 13 Apr 2022 13:44:59 +0200 Subject: [PATCH] Extract `fj-export` from `fj-app` --- Cargo.lock | 11 +++++++++- fj-app/Cargo.toml | 5 ++++- fj-app/src/main.rs | 3 +-- fj-export/Cargo.toml | 23 ++++++++++++++++++++ fj-app/src/export.rs => fj-export/src/lib.rs | 0 5 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 fj-export/Cargo.toml rename fj-app/src/export.rs => fj-export/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index bfb551ed5..e5611164b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -698,6 +698,7 @@ dependencies = [ "clap", "figment", "fj", + "fj-export", "fj-host", "fj-interop", "fj-kernel", @@ -708,7 +709,6 @@ dependencies = [ "parry3d-f64", "serde", "thiserror", - "threemf", "tracing", "tracing-subscriber", "wgpu", @@ -716,6 +716,15 @@ dependencies = [ "winit", ] +[[package]] +name = "fj-export" +version = "0.5.0" +dependencies = [ + "fj-interop", + "fj-math", + "threemf", +] + [[package]] name = "fj-host" version = "0.5.0" diff --git a/fj-app/Cargo.toml b/fj-app/Cargo.toml index ec642080e..63ad7538c 100644 --- a/fj-app/Cargo.toml +++ b/fj-app/Cargo.toml @@ -18,7 +18,6 @@ futures = "0.3.21" nalgebra = "0.30.0" parry3d-f64 = "0.8.0" thiserror = "1.0.30" -threemf = "0.3.0" tracing = "0.1.33" wgpu = "0.12.0" wgpu_glyph = "0.16.0" @@ -36,6 +35,10 @@ features = ["env", "toml"] version = "0.5.0" path = "../fj" +[dependencies.fj-export] +version = "0.5.0" +path = "../fj-export" + [dependencies.fj-host] version = "0.5.0" path = "../fj-host" diff --git a/fj-app/src/main.rs b/fj-app/src/main.rs index f0f236bd1..9e770c87e 100644 --- a/fj-app/src/main.rs +++ b/fj-app/src/main.rs @@ -1,7 +1,6 @@ mod args; mod camera; mod config; -mod export; mod graphics; mod input; mod window; @@ -10,6 +9,7 @@ use std::path::PathBuf; use std::time::Instant; use anyhow::anyhow; +use fj_export::export; use fj_host::{Model, Parameters}; use fj_operations::shape_processor::ShapeProcessor; use futures::executor::block_on; @@ -25,7 +25,6 @@ use crate::{ args::Args, camera::Camera, config::Config, - export::export, graphics::{DrawConfig, Renderer}, window::Window, }; diff --git a/fj-export/Cargo.toml b/fj-export/Cargo.toml new file mode 100644 index 000000000..5086dcba6 --- /dev/null +++ b/fj-export/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "fj-export" +version = "0.5.0" +edition = "2021" + +description = "The world needs another CAD program." +readme = "../README.md" +repository = "https://github.com/hannobraun/fornjot" +license = "0BSD" +keywords = ["cad", "programmatic", "code-cad"] +categories = ["encoding"] + + +[dependencies] +threemf = "0.3.0" + +[dependencies.fj-interop] +version = "0.5.0" +path = "../fj-interop" + +[dependencies.fj-math] +version = "0.5.0" +path = "../fj-math" diff --git a/fj-app/src/export.rs b/fj-export/src/lib.rs similarity index 100% rename from fj-app/src/export.rs rename to fj-export/src/lib.rs