From 52d3e1acbd4c613a855d621d834bf6fb4290a26b Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 13 Apr 2022 15:47:01 +0200 Subject: [PATCH 1/4] Move all Fornjot crates into `crates/` folder This has a few advantages: 1. There's less visual noise in the top folder, making it easier to become familiar. 2. It becomes more obvious, which of the folders contain Fornjot crates, as opposed to other crates that are not relevant outside of this repository. 3. It opens the door for further automation of the release process, by providing an easy way to detect all crates that should be published. --- .github/workflows/cd.yml | 18 +++++----- Cargo.toml | 34 +++++++++--------- {fj-app => crates/fj-app}/Cargo.toml | 0 {fj-app => crates/fj-app}/src/args.rs | 0 {fj-app => crates/fj-app}/src/config.rs | 0 {fj-app => crates/fj-app}/src/main.rs | 0 {fj-export => crates/fj-export}/Cargo.toml | 0 {fj-export => crates/fj-export}/src/lib.rs | 0 {fj-host => crates/fj-host}/Cargo.toml | 0 {fj-host => crates/fj-host}/src/lib.rs | 0 {fj-host => crates/fj-host}/src/platform.rs | 0 {fj-interop => crates/fj-interop}/Cargo.toml | 0 .../fj-interop}/src/debug.rs | 0 {fj-interop => crates/fj-interop}/src/lib.rs | 0 {fj-interop => crates/fj-interop}/src/mesh.rs | 0 {fj-kernel => crates/fj-kernel}/Cargo.toml | 0 .../src/algorithms/approximation.rs | 0 .../fj-kernel}/src/algorithms/mod.rs | 0 .../fj-kernel}/src/algorithms/sweep.rs | 0 .../src/algorithms/triangulation/delaunay.rs | 0 .../src/algorithms/triangulation/mod.rs | 0 .../src/algorithms/triangulation/polygon.rs | 0 .../src/algorithms/triangulation/ray.rs | 0 .../fj-kernel}/src/geometry/curves/circle.rs | 0 .../fj-kernel}/src/geometry/curves/line.rs | 0 .../fj-kernel}/src/geometry/curves/mod.rs | 0 .../fj-kernel}/src/geometry/mod.rs | 0 .../fj-kernel}/src/geometry/points.rs | 0 .../fj-kernel}/src/geometry/surfaces/mod.rs | 0 .../fj-kernel}/src/geometry/surfaces/swept.rs | 0 {fj-kernel => crates/fj-kernel}/src/lib.rs | 0 .../fj-kernel}/src/shape/api.rs | 0 .../fj-kernel}/src/shape/geometry.rs | 0 .../fj-kernel}/src/shape/mod.rs | 0 .../fj-kernel}/src/shape/object.rs | 0 .../fj-kernel}/src/shape/stores.rs | 0 .../fj-kernel}/src/shape/topology.rs | 0 .../fj-kernel}/src/shape/validate.rs | 0 .../fj-kernel}/src/topology/builder.rs | 0 .../fj-kernel}/src/topology/edges.rs | 0 .../fj-kernel}/src/topology/faces.rs | 0 .../fj-kernel}/src/topology/mod.rs | 0 .../fj-kernel}/src/topology/vertices.rs | 0 {fj-math => crates/fj-math}/Cargo.toml | 0 {fj-math => crates/fj-math}/src/aabb.rs | 0 .../fj-math}/src/coordinates.rs | 0 {fj-math => crates/fj-math}/src/lib.rs | 0 {fj-math => crates/fj-math}/src/point.rs | 0 {fj-math => crates/fj-math}/src/poly_chain.rs | 0 {fj-math => crates/fj-math}/src/scalar.rs | 0 {fj-math => crates/fj-math}/src/segment.rs | 0 {fj-math => crates/fj-math}/src/transform.rs | 0 {fj-math => crates/fj-math}/src/triangle.rs | 0 {fj-math => crates/fj-math}/src/vector.rs | 0 .../fj-operations}/Cargo.toml | 0 .../fj-operations}/src/circle.rs | 0 .../fj-operations}/src/difference_2d.rs | 0 .../fj-operations}/src/group.rs | 0 .../fj-operations}/src/lib.rs | 0 .../fj-operations}/src/shape_processor.rs | 0 .../fj-operations}/src/sketch.rs | 0 .../fj-operations}/src/sweep.rs | 0 .../fj-operations}/src/transform.rs | 0 {fj-viewer => crates/fj-viewer}/Cargo.toml | 0 {fj-viewer => crates/fj-viewer}/src/camera.rs | 0 .../fj-viewer}/src/graphics/config_ui.rs | 0 .../fj-viewer}/src/graphics/draw_config.rs | 0 .../fj-viewer}/src/graphics/drawables.rs | 0 .../src/graphics/fonts/B612-Bold.ttf | Bin .../src/graphics/fonts/B612-BoldItalic.ttf | Bin .../src/graphics/fonts/B612-Italic.ttf | Bin .../src/graphics/fonts/B612-Regular.ttf | Bin .../src/graphics/fonts/B612Mono-Bold.ttf | Bin .../graphics/fonts/B612Mono-BoldItalic.ttf | Bin .../src/graphics/fonts/B612Mono-Italic.ttf | Bin .../src/graphics/fonts/B612Mono-Regular.ttf | Bin .../fj-viewer}/src/graphics/fonts/OFL.txt | 0 .../fj-viewer}/src/graphics/geometries.rs | 0 .../fj-viewer}/src/graphics/mod.rs | 0 .../fj-viewer}/src/graphics/pipelines.rs | 0 .../fj-viewer}/src/graphics/renderer.rs | 0 .../fj-viewer}/src/graphics/shader.wgsl | 0 .../fj-viewer}/src/graphics/shaders.rs | 0 .../fj-viewer}/src/graphics/transform.rs | 0 .../fj-viewer}/src/graphics/uniforms.rs | 0 .../fj-viewer}/src/graphics/vertices.rs | 0 .../fj-viewer}/src/input/handler.rs | 0 .../fj-viewer}/src/input/mod.rs | 0 .../fj-viewer}/src/input/movement.rs | 0 .../fj-viewer}/src/input/rotation.rs | 0 .../fj-viewer}/src/input/zoom.rs | 0 {fj-viewer => crates/fj-viewer}/src/lib.rs | 0 {fj-viewer => crates/fj-viewer}/src/run.rs | 0 {fj-viewer => crates/fj-viewer}/src/window.rs | 0 {fj => crates/fj}/Cargo.toml | 0 {fj => crates/fj}/src/lib.rs | 0 {fj => crates/fj}/src/shape_2d.rs | 0 {fj => crates/fj}/src/shape_3d.rs | 0 {fj => crates/fj}/src/syntax.rs | 0 models/cuboid/Cargo.toml | 2 +- models/group/Cargo.toml | 2 +- models/spacer/Cargo.toml | 2 +- models/star/Cargo.toml | 2 +- 103 files changed, 30 insertions(+), 30 deletions(-) rename {fj-app => crates/fj-app}/Cargo.toml (100%) rename {fj-app => crates/fj-app}/src/args.rs (100%) rename {fj-app => crates/fj-app}/src/config.rs (100%) rename {fj-app => crates/fj-app}/src/main.rs (100%) rename {fj-export => crates/fj-export}/Cargo.toml (100%) rename {fj-export => crates/fj-export}/src/lib.rs (100%) rename {fj-host => crates/fj-host}/Cargo.toml (100%) rename {fj-host => crates/fj-host}/src/lib.rs (100%) rename {fj-host => crates/fj-host}/src/platform.rs (100%) rename {fj-interop => crates/fj-interop}/Cargo.toml (100%) rename {fj-interop => crates/fj-interop}/src/debug.rs (100%) rename {fj-interop => crates/fj-interop}/src/lib.rs (100%) rename {fj-interop => crates/fj-interop}/src/mesh.rs (100%) rename {fj-kernel => crates/fj-kernel}/Cargo.toml (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/approximation.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/sweep.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/triangulation/delaunay.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/triangulation/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/triangulation/polygon.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/algorithms/triangulation/ray.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/curves/circle.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/curves/line.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/curves/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/points.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/surfaces/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/geometry/surfaces/swept.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/lib.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/api.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/geometry.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/object.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/stores.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/topology.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/shape/validate.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/topology/builder.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/topology/edges.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/topology/faces.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/topology/mod.rs (100%) rename {fj-kernel => crates/fj-kernel}/src/topology/vertices.rs (100%) rename {fj-math => crates/fj-math}/Cargo.toml (100%) rename {fj-math => crates/fj-math}/src/aabb.rs (100%) rename {fj-math => crates/fj-math}/src/coordinates.rs (100%) rename {fj-math => crates/fj-math}/src/lib.rs (100%) rename {fj-math => crates/fj-math}/src/point.rs (100%) rename {fj-math => crates/fj-math}/src/poly_chain.rs (100%) rename {fj-math => crates/fj-math}/src/scalar.rs (100%) rename {fj-math => crates/fj-math}/src/segment.rs (100%) rename {fj-math => crates/fj-math}/src/transform.rs (100%) rename {fj-math => crates/fj-math}/src/triangle.rs (100%) rename {fj-math => crates/fj-math}/src/vector.rs (100%) rename {fj-operations => crates/fj-operations}/Cargo.toml (100%) rename {fj-operations => crates/fj-operations}/src/circle.rs (100%) rename {fj-operations => crates/fj-operations}/src/difference_2d.rs (100%) rename {fj-operations => crates/fj-operations}/src/group.rs (100%) rename {fj-operations => crates/fj-operations}/src/lib.rs (100%) rename {fj-operations => crates/fj-operations}/src/shape_processor.rs (100%) rename {fj-operations => crates/fj-operations}/src/sketch.rs (100%) rename {fj-operations => crates/fj-operations}/src/sweep.rs (100%) rename {fj-operations => crates/fj-operations}/src/transform.rs (100%) rename {fj-viewer => crates/fj-viewer}/Cargo.toml (100%) rename {fj-viewer => crates/fj-viewer}/src/camera.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/config_ui.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/draw_config.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/drawables.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612-Bold.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612-BoldItalic.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612-Italic.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612-Regular.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612Mono-Bold.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612Mono-BoldItalic.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612Mono-Italic.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/B612Mono-Regular.ttf (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/fonts/OFL.txt (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/geometries.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/mod.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/pipelines.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/renderer.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/shader.wgsl (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/shaders.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/transform.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/uniforms.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/graphics/vertices.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/input/handler.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/input/mod.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/input/movement.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/input/rotation.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/input/zoom.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/lib.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/run.rs (100%) rename {fj-viewer => crates/fj-viewer}/src/window.rs (100%) rename {fj => crates/fj}/Cargo.toml (100%) rename {fj => crates/fj}/src/lib.rs (100%) rename {fj => crates/fj}/src/shape_2d.rs (100%) rename {fj => crates/fj}/src/shape_3d.rs (100%) rename {fj => crates/fj}/src/syntax.rs (100%) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 25ae84250..e1d1eff92 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -137,12 +137,12 @@ jobs: # Publish to crates.io cargo run -- publish \ --token ${{ secrets.CARGO_REGISTRY_TOKEN }} \ - --crate ../fj-app \ - --crate ../fj-export \ - --crate ../fj-host \ - --crate ../fj-interop \ - --crate ../fj-kernel \ - --crate ../fj-math \ - --crate ../fj-operations \ - --crate ../fj-viewer \ - --crate ../fj + --crate ../crates/fj-app \ + --crate ../crates/fj-export \ + --crate ../crates/fj-host \ + --crate ../crates/fj-interop \ + --crate ../crates/fj-kernel \ + --crate ../crates/fj-math \ + --crate ../crates/fj-operations \ + --crate ../crates/fj-viewer \ + --crate ../crates/fj diff --git a/Cargo.toml b/Cargo.toml index 846e2fa61..982bb6c47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [workspace] resolver = "2" members = [ - "fj", - "fj-app", - "fj-export", - "fj-host", - "fj-interop", - "fj-kernel", - "fj-math", - "fj-operations", - "fj-viewer", + "crates/fj", + "crates/fj-app", + "crates/fj-export", + "crates/fj-host", + "crates/fj-interop", + "crates/fj-kernel", + "crates/fj-math", + "crates/fj-operations", + "crates/fj-viewer", "models/cuboid", "models/group", @@ -19,12 +19,12 @@ members = [ "release-operator", ] default-members = [ - "fj-app", - "fj-export", - "fj-host", - "fj-interop", - "fj-kernel", - "fj-math", - "fj-operations", - "fj-viewer", + "crates/fj-app", + "crates/fj-export", + "crates/fj-host", + "crates/fj-interop", + "crates/fj-kernel", + "crates/fj-math", + "crates/fj-operations", + "crates/fj-viewer", ] diff --git a/fj-app/Cargo.toml b/crates/fj-app/Cargo.toml similarity index 100% rename from fj-app/Cargo.toml rename to crates/fj-app/Cargo.toml diff --git a/fj-app/src/args.rs b/crates/fj-app/src/args.rs similarity index 100% rename from fj-app/src/args.rs rename to crates/fj-app/src/args.rs diff --git a/fj-app/src/config.rs b/crates/fj-app/src/config.rs similarity index 100% rename from fj-app/src/config.rs rename to crates/fj-app/src/config.rs diff --git a/fj-app/src/main.rs b/crates/fj-app/src/main.rs similarity index 100% rename from fj-app/src/main.rs rename to crates/fj-app/src/main.rs diff --git a/fj-export/Cargo.toml b/crates/fj-export/Cargo.toml similarity index 100% rename from fj-export/Cargo.toml rename to crates/fj-export/Cargo.toml diff --git a/fj-export/src/lib.rs b/crates/fj-export/src/lib.rs similarity index 100% rename from fj-export/src/lib.rs rename to crates/fj-export/src/lib.rs diff --git a/fj-host/Cargo.toml b/crates/fj-host/Cargo.toml similarity index 100% rename from fj-host/Cargo.toml rename to crates/fj-host/Cargo.toml diff --git a/fj-host/src/lib.rs b/crates/fj-host/src/lib.rs similarity index 100% rename from fj-host/src/lib.rs rename to crates/fj-host/src/lib.rs diff --git a/fj-host/src/platform.rs b/crates/fj-host/src/platform.rs similarity index 100% rename from fj-host/src/platform.rs rename to crates/fj-host/src/platform.rs diff --git a/fj-interop/Cargo.toml b/crates/fj-interop/Cargo.toml similarity index 100% rename from fj-interop/Cargo.toml rename to crates/fj-interop/Cargo.toml diff --git a/fj-interop/src/debug.rs b/crates/fj-interop/src/debug.rs similarity index 100% rename from fj-interop/src/debug.rs rename to crates/fj-interop/src/debug.rs diff --git a/fj-interop/src/lib.rs b/crates/fj-interop/src/lib.rs similarity index 100% rename from fj-interop/src/lib.rs rename to crates/fj-interop/src/lib.rs diff --git a/fj-interop/src/mesh.rs b/crates/fj-interop/src/mesh.rs similarity index 100% rename from fj-interop/src/mesh.rs rename to crates/fj-interop/src/mesh.rs diff --git a/fj-kernel/Cargo.toml b/crates/fj-kernel/Cargo.toml similarity index 100% rename from fj-kernel/Cargo.toml rename to crates/fj-kernel/Cargo.toml diff --git a/fj-kernel/src/algorithms/approximation.rs b/crates/fj-kernel/src/algorithms/approximation.rs similarity index 100% rename from fj-kernel/src/algorithms/approximation.rs rename to crates/fj-kernel/src/algorithms/approximation.rs diff --git a/fj-kernel/src/algorithms/mod.rs b/crates/fj-kernel/src/algorithms/mod.rs similarity index 100% rename from fj-kernel/src/algorithms/mod.rs rename to crates/fj-kernel/src/algorithms/mod.rs diff --git a/fj-kernel/src/algorithms/sweep.rs b/crates/fj-kernel/src/algorithms/sweep.rs similarity index 100% rename from fj-kernel/src/algorithms/sweep.rs rename to crates/fj-kernel/src/algorithms/sweep.rs diff --git a/fj-kernel/src/algorithms/triangulation/delaunay.rs b/crates/fj-kernel/src/algorithms/triangulation/delaunay.rs similarity index 100% rename from fj-kernel/src/algorithms/triangulation/delaunay.rs rename to crates/fj-kernel/src/algorithms/triangulation/delaunay.rs diff --git a/fj-kernel/src/algorithms/triangulation/mod.rs b/crates/fj-kernel/src/algorithms/triangulation/mod.rs similarity index 100% rename from fj-kernel/src/algorithms/triangulation/mod.rs rename to crates/fj-kernel/src/algorithms/triangulation/mod.rs diff --git a/fj-kernel/src/algorithms/triangulation/polygon.rs b/crates/fj-kernel/src/algorithms/triangulation/polygon.rs similarity index 100% rename from fj-kernel/src/algorithms/triangulation/polygon.rs rename to crates/fj-kernel/src/algorithms/triangulation/polygon.rs diff --git a/fj-kernel/src/algorithms/triangulation/ray.rs b/crates/fj-kernel/src/algorithms/triangulation/ray.rs similarity index 100% rename from fj-kernel/src/algorithms/triangulation/ray.rs rename to crates/fj-kernel/src/algorithms/triangulation/ray.rs diff --git a/fj-kernel/src/geometry/curves/circle.rs b/crates/fj-kernel/src/geometry/curves/circle.rs similarity index 100% rename from fj-kernel/src/geometry/curves/circle.rs rename to crates/fj-kernel/src/geometry/curves/circle.rs diff --git a/fj-kernel/src/geometry/curves/line.rs b/crates/fj-kernel/src/geometry/curves/line.rs similarity index 100% rename from fj-kernel/src/geometry/curves/line.rs rename to crates/fj-kernel/src/geometry/curves/line.rs diff --git a/fj-kernel/src/geometry/curves/mod.rs b/crates/fj-kernel/src/geometry/curves/mod.rs similarity index 100% rename from fj-kernel/src/geometry/curves/mod.rs rename to crates/fj-kernel/src/geometry/curves/mod.rs diff --git a/fj-kernel/src/geometry/mod.rs b/crates/fj-kernel/src/geometry/mod.rs similarity index 100% rename from fj-kernel/src/geometry/mod.rs rename to crates/fj-kernel/src/geometry/mod.rs diff --git a/fj-kernel/src/geometry/points.rs b/crates/fj-kernel/src/geometry/points.rs similarity index 100% rename from fj-kernel/src/geometry/points.rs rename to crates/fj-kernel/src/geometry/points.rs diff --git a/fj-kernel/src/geometry/surfaces/mod.rs b/crates/fj-kernel/src/geometry/surfaces/mod.rs similarity index 100% rename from fj-kernel/src/geometry/surfaces/mod.rs rename to crates/fj-kernel/src/geometry/surfaces/mod.rs diff --git a/fj-kernel/src/geometry/surfaces/swept.rs b/crates/fj-kernel/src/geometry/surfaces/swept.rs similarity index 100% rename from fj-kernel/src/geometry/surfaces/swept.rs rename to crates/fj-kernel/src/geometry/surfaces/swept.rs diff --git a/fj-kernel/src/lib.rs b/crates/fj-kernel/src/lib.rs similarity index 100% rename from fj-kernel/src/lib.rs rename to crates/fj-kernel/src/lib.rs diff --git a/fj-kernel/src/shape/api.rs b/crates/fj-kernel/src/shape/api.rs similarity index 100% rename from fj-kernel/src/shape/api.rs rename to crates/fj-kernel/src/shape/api.rs diff --git a/fj-kernel/src/shape/geometry.rs b/crates/fj-kernel/src/shape/geometry.rs similarity index 100% rename from fj-kernel/src/shape/geometry.rs rename to crates/fj-kernel/src/shape/geometry.rs diff --git a/fj-kernel/src/shape/mod.rs b/crates/fj-kernel/src/shape/mod.rs similarity index 100% rename from fj-kernel/src/shape/mod.rs rename to crates/fj-kernel/src/shape/mod.rs diff --git a/fj-kernel/src/shape/object.rs b/crates/fj-kernel/src/shape/object.rs similarity index 100% rename from fj-kernel/src/shape/object.rs rename to crates/fj-kernel/src/shape/object.rs diff --git a/fj-kernel/src/shape/stores.rs b/crates/fj-kernel/src/shape/stores.rs similarity index 100% rename from fj-kernel/src/shape/stores.rs rename to crates/fj-kernel/src/shape/stores.rs diff --git a/fj-kernel/src/shape/topology.rs b/crates/fj-kernel/src/shape/topology.rs similarity index 100% rename from fj-kernel/src/shape/topology.rs rename to crates/fj-kernel/src/shape/topology.rs diff --git a/fj-kernel/src/shape/validate.rs b/crates/fj-kernel/src/shape/validate.rs similarity index 100% rename from fj-kernel/src/shape/validate.rs rename to crates/fj-kernel/src/shape/validate.rs diff --git a/fj-kernel/src/topology/builder.rs b/crates/fj-kernel/src/topology/builder.rs similarity index 100% rename from fj-kernel/src/topology/builder.rs rename to crates/fj-kernel/src/topology/builder.rs diff --git a/fj-kernel/src/topology/edges.rs b/crates/fj-kernel/src/topology/edges.rs similarity index 100% rename from fj-kernel/src/topology/edges.rs rename to crates/fj-kernel/src/topology/edges.rs diff --git a/fj-kernel/src/topology/faces.rs b/crates/fj-kernel/src/topology/faces.rs similarity index 100% rename from fj-kernel/src/topology/faces.rs rename to crates/fj-kernel/src/topology/faces.rs diff --git a/fj-kernel/src/topology/mod.rs b/crates/fj-kernel/src/topology/mod.rs similarity index 100% rename from fj-kernel/src/topology/mod.rs rename to crates/fj-kernel/src/topology/mod.rs diff --git a/fj-kernel/src/topology/vertices.rs b/crates/fj-kernel/src/topology/vertices.rs similarity index 100% rename from fj-kernel/src/topology/vertices.rs rename to crates/fj-kernel/src/topology/vertices.rs diff --git a/fj-math/Cargo.toml b/crates/fj-math/Cargo.toml similarity index 100% rename from fj-math/Cargo.toml rename to crates/fj-math/Cargo.toml diff --git a/fj-math/src/aabb.rs b/crates/fj-math/src/aabb.rs similarity index 100% rename from fj-math/src/aabb.rs rename to crates/fj-math/src/aabb.rs diff --git a/fj-math/src/coordinates.rs b/crates/fj-math/src/coordinates.rs similarity index 100% rename from fj-math/src/coordinates.rs rename to crates/fj-math/src/coordinates.rs diff --git a/fj-math/src/lib.rs b/crates/fj-math/src/lib.rs similarity index 100% rename from fj-math/src/lib.rs rename to crates/fj-math/src/lib.rs diff --git a/fj-math/src/point.rs b/crates/fj-math/src/point.rs similarity index 100% rename from fj-math/src/point.rs rename to crates/fj-math/src/point.rs diff --git a/fj-math/src/poly_chain.rs b/crates/fj-math/src/poly_chain.rs similarity index 100% rename from fj-math/src/poly_chain.rs rename to crates/fj-math/src/poly_chain.rs diff --git a/fj-math/src/scalar.rs b/crates/fj-math/src/scalar.rs similarity index 100% rename from fj-math/src/scalar.rs rename to crates/fj-math/src/scalar.rs diff --git a/fj-math/src/segment.rs b/crates/fj-math/src/segment.rs similarity index 100% rename from fj-math/src/segment.rs rename to crates/fj-math/src/segment.rs diff --git a/fj-math/src/transform.rs b/crates/fj-math/src/transform.rs similarity index 100% rename from fj-math/src/transform.rs rename to crates/fj-math/src/transform.rs diff --git a/fj-math/src/triangle.rs b/crates/fj-math/src/triangle.rs similarity index 100% rename from fj-math/src/triangle.rs rename to crates/fj-math/src/triangle.rs diff --git a/fj-math/src/vector.rs b/crates/fj-math/src/vector.rs similarity index 100% rename from fj-math/src/vector.rs rename to crates/fj-math/src/vector.rs diff --git a/fj-operations/Cargo.toml b/crates/fj-operations/Cargo.toml similarity index 100% rename from fj-operations/Cargo.toml rename to crates/fj-operations/Cargo.toml diff --git a/fj-operations/src/circle.rs b/crates/fj-operations/src/circle.rs similarity index 100% rename from fj-operations/src/circle.rs rename to crates/fj-operations/src/circle.rs diff --git a/fj-operations/src/difference_2d.rs b/crates/fj-operations/src/difference_2d.rs similarity index 100% rename from fj-operations/src/difference_2d.rs rename to crates/fj-operations/src/difference_2d.rs diff --git a/fj-operations/src/group.rs b/crates/fj-operations/src/group.rs similarity index 100% rename from fj-operations/src/group.rs rename to crates/fj-operations/src/group.rs diff --git a/fj-operations/src/lib.rs b/crates/fj-operations/src/lib.rs similarity index 100% rename from fj-operations/src/lib.rs rename to crates/fj-operations/src/lib.rs diff --git a/fj-operations/src/shape_processor.rs b/crates/fj-operations/src/shape_processor.rs similarity index 100% rename from fj-operations/src/shape_processor.rs rename to crates/fj-operations/src/shape_processor.rs diff --git a/fj-operations/src/sketch.rs b/crates/fj-operations/src/sketch.rs similarity index 100% rename from fj-operations/src/sketch.rs rename to crates/fj-operations/src/sketch.rs diff --git a/fj-operations/src/sweep.rs b/crates/fj-operations/src/sweep.rs similarity index 100% rename from fj-operations/src/sweep.rs rename to crates/fj-operations/src/sweep.rs diff --git a/fj-operations/src/transform.rs b/crates/fj-operations/src/transform.rs similarity index 100% rename from fj-operations/src/transform.rs rename to crates/fj-operations/src/transform.rs diff --git a/fj-viewer/Cargo.toml b/crates/fj-viewer/Cargo.toml similarity index 100% rename from fj-viewer/Cargo.toml rename to crates/fj-viewer/Cargo.toml diff --git a/fj-viewer/src/camera.rs b/crates/fj-viewer/src/camera.rs similarity index 100% rename from fj-viewer/src/camera.rs rename to crates/fj-viewer/src/camera.rs diff --git a/fj-viewer/src/graphics/config_ui.rs b/crates/fj-viewer/src/graphics/config_ui.rs similarity index 100% rename from fj-viewer/src/graphics/config_ui.rs rename to crates/fj-viewer/src/graphics/config_ui.rs diff --git a/fj-viewer/src/graphics/draw_config.rs b/crates/fj-viewer/src/graphics/draw_config.rs similarity index 100% rename from fj-viewer/src/graphics/draw_config.rs rename to crates/fj-viewer/src/graphics/draw_config.rs diff --git a/fj-viewer/src/graphics/drawables.rs b/crates/fj-viewer/src/graphics/drawables.rs similarity index 100% rename from fj-viewer/src/graphics/drawables.rs rename to crates/fj-viewer/src/graphics/drawables.rs diff --git a/fj-viewer/src/graphics/fonts/B612-Bold.ttf b/crates/fj-viewer/src/graphics/fonts/B612-Bold.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612-Bold.ttf rename to crates/fj-viewer/src/graphics/fonts/B612-Bold.ttf diff --git a/fj-viewer/src/graphics/fonts/B612-BoldItalic.ttf b/crates/fj-viewer/src/graphics/fonts/B612-BoldItalic.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612-BoldItalic.ttf rename to crates/fj-viewer/src/graphics/fonts/B612-BoldItalic.ttf diff --git a/fj-viewer/src/graphics/fonts/B612-Italic.ttf b/crates/fj-viewer/src/graphics/fonts/B612-Italic.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612-Italic.ttf rename to crates/fj-viewer/src/graphics/fonts/B612-Italic.ttf diff --git a/fj-viewer/src/graphics/fonts/B612-Regular.ttf b/crates/fj-viewer/src/graphics/fonts/B612-Regular.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612-Regular.ttf rename to crates/fj-viewer/src/graphics/fonts/B612-Regular.ttf diff --git a/fj-viewer/src/graphics/fonts/B612Mono-Bold.ttf b/crates/fj-viewer/src/graphics/fonts/B612Mono-Bold.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612Mono-Bold.ttf rename to crates/fj-viewer/src/graphics/fonts/B612Mono-Bold.ttf diff --git a/fj-viewer/src/graphics/fonts/B612Mono-BoldItalic.ttf b/crates/fj-viewer/src/graphics/fonts/B612Mono-BoldItalic.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612Mono-BoldItalic.ttf rename to crates/fj-viewer/src/graphics/fonts/B612Mono-BoldItalic.ttf diff --git a/fj-viewer/src/graphics/fonts/B612Mono-Italic.ttf b/crates/fj-viewer/src/graphics/fonts/B612Mono-Italic.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612Mono-Italic.ttf rename to crates/fj-viewer/src/graphics/fonts/B612Mono-Italic.ttf diff --git a/fj-viewer/src/graphics/fonts/B612Mono-Regular.ttf b/crates/fj-viewer/src/graphics/fonts/B612Mono-Regular.ttf similarity index 100% rename from fj-viewer/src/graphics/fonts/B612Mono-Regular.ttf rename to crates/fj-viewer/src/graphics/fonts/B612Mono-Regular.ttf diff --git a/fj-viewer/src/graphics/fonts/OFL.txt b/crates/fj-viewer/src/graphics/fonts/OFL.txt similarity index 100% rename from fj-viewer/src/graphics/fonts/OFL.txt rename to crates/fj-viewer/src/graphics/fonts/OFL.txt diff --git a/fj-viewer/src/graphics/geometries.rs b/crates/fj-viewer/src/graphics/geometries.rs similarity index 100% rename from fj-viewer/src/graphics/geometries.rs rename to crates/fj-viewer/src/graphics/geometries.rs diff --git a/fj-viewer/src/graphics/mod.rs b/crates/fj-viewer/src/graphics/mod.rs similarity index 100% rename from fj-viewer/src/graphics/mod.rs rename to crates/fj-viewer/src/graphics/mod.rs diff --git a/fj-viewer/src/graphics/pipelines.rs b/crates/fj-viewer/src/graphics/pipelines.rs similarity index 100% rename from fj-viewer/src/graphics/pipelines.rs rename to crates/fj-viewer/src/graphics/pipelines.rs diff --git a/fj-viewer/src/graphics/renderer.rs b/crates/fj-viewer/src/graphics/renderer.rs similarity index 100% rename from fj-viewer/src/graphics/renderer.rs rename to crates/fj-viewer/src/graphics/renderer.rs diff --git a/fj-viewer/src/graphics/shader.wgsl b/crates/fj-viewer/src/graphics/shader.wgsl similarity index 100% rename from fj-viewer/src/graphics/shader.wgsl rename to crates/fj-viewer/src/graphics/shader.wgsl diff --git a/fj-viewer/src/graphics/shaders.rs b/crates/fj-viewer/src/graphics/shaders.rs similarity index 100% rename from fj-viewer/src/graphics/shaders.rs rename to crates/fj-viewer/src/graphics/shaders.rs diff --git a/fj-viewer/src/graphics/transform.rs b/crates/fj-viewer/src/graphics/transform.rs similarity index 100% rename from fj-viewer/src/graphics/transform.rs rename to crates/fj-viewer/src/graphics/transform.rs diff --git a/fj-viewer/src/graphics/uniforms.rs b/crates/fj-viewer/src/graphics/uniforms.rs similarity index 100% rename from fj-viewer/src/graphics/uniforms.rs rename to crates/fj-viewer/src/graphics/uniforms.rs diff --git a/fj-viewer/src/graphics/vertices.rs b/crates/fj-viewer/src/graphics/vertices.rs similarity index 100% rename from fj-viewer/src/graphics/vertices.rs rename to crates/fj-viewer/src/graphics/vertices.rs diff --git a/fj-viewer/src/input/handler.rs b/crates/fj-viewer/src/input/handler.rs similarity index 100% rename from fj-viewer/src/input/handler.rs rename to crates/fj-viewer/src/input/handler.rs diff --git a/fj-viewer/src/input/mod.rs b/crates/fj-viewer/src/input/mod.rs similarity index 100% rename from fj-viewer/src/input/mod.rs rename to crates/fj-viewer/src/input/mod.rs diff --git a/fj-viewer/src/input/movement.rs b/crates/fj-viewer/src/input/movement.rs similarity index 100% rename from fj-viewer/src/input/movement.rs rename to crates/fj-viewer/src/input/movement.rs diff --git a/fj-viewer/src/input/rotation.rs b/crates/fj-viewer/src/input/rotation.rs similarity index 100% rename from fj-viewer/src/input/rotation.rs rename to crates/fj-viewer/src/input/rotation.rs diff --git a/fj-viewer/src/input/zoom.rs b/crates/fj-viewer/src/input/zoom.rs similarity index 100% rename from fj-viewer/src/input/zoom.rs rename to crates/fj-viewer/src/input/zoom.rs diff --git a/fj-viewer/src/lib.rs b/crates/fj-viewer/src/lib.rs similarity index 100% rename from fj-viewer/src/lib.rs rename to crates/fj-viewer/src/lib.rs diff --git a/fj-viewer/src/run.rs b/crates/fj-viewer/src/run.rs similarity index 100% rename from fj-viewer/src/run.rs rename to crates/fj-viewer/src/run.rs diff --git a/fj-viewer/src/window.rs b/crates/fj-viewer/src/window.rs similarity index 100% rename from fj-viewer/src/window.rs rename to crates/fj-viewer/src/window.rs diff --git a/fj/Cargo.toml b/crates/fj/Cargo.toml similarity index 100% rename from fj/Cargo.toml rename to crates/fj/Cargo.toml diff --git a/fj/src/lib.rs b/crates/fj/src/lib.rs similarity index 100% rename from fj/src/lib.rs rename to crates/fj/src/lib.rs diff --git a/fj/src/shape_2d.rs b/crates/fj/src/shape_2d.rs similarity index 100% rename from fj/src/shape_2d.rs rename to crates/fj/src/shape_2d.rs diff --git a/fj/src/shape_3d.rs b/crates/fj/src/shape_3d.rs similarity index 100% rename from fj/src/shape_3d.rs rename to crates/fj/src/shape_3d.rs diff --git a/fj/src/syntax.rs b/crates/fj/src/syntax.rs similarity index 100% rename from fj/src/syntax.rs rename to crates/fj/src/syntax.rs diff --git a/models/cuboid/Cargo.toml b/models/cuboid/Cargo.toml index 7ce5c840d..bb653d0c8 100644 --- a/models/cuboid/Cargo.toml +++ b/models/cuboid/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies.fj] -path = "../../fj" +path = "../../crates/fj" diff --git a/models/group/Cargo.toml b/models/group/Cargo.toml index 380514ee3..32e449e7b 100644 --- a/models/group/Cargo.toml +++ b/models/group/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies.fj] -path = "../../fj" +path = "../../crates/fj" diff --git a/models/spacer/Cargo.toml b/models/spacer/Cargo.toml index d4f18bbef..1eaf19c6a 100644 --- a/models/spacer/Cargo.toml +++ b/models/spacer/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies.fj] -path = "../../fj" +path = "../../crates/fj" diff --git a/models/star/Cargo.toml b/models/star/Cargo.toml index 5ed04729e..c5c2d4efd 100644 --- a/models/star/Cargo.toml +++ b/models/star/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies.fj] -path = "../../fj" +path = "../../crates/fj" From 55e383132e173a76be989b64cc9d5320910d9729 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 13 Apr 2022 15:51:47 +0200 Subject: [PATCH 2/4] Move release-operator to `tools/` folder This has the following advantages: 1. It provides some implicit documentation on what release-operator is, making it easier to see at first glance what's relevant only inside this repository, and what's relevant to users. 2. It provides a place for adding more tools later, without creating a mess in the repository root. --- .github/workflows/cd.yml | 6 +++--- Cargo.toml | 2 +- {release-operator => tools/release-operator}/Cargo.toml | 0 {release-operator => tools/release-operator}/README.md | 0 {release-operator => tools/release-operator}/src/github.rs | 0 {release-operator => tools/release-operator}/src/main.rs | 0 .../release-operator}/src/registry.rs | 0 {release-operator => tools/release-operator}/src/release.rs | 0 8 files changed, 4 insertions(+), 4 deletions(-) rename {release-operator => tools/release-operator}/Cargo.toml (100%) rename {release-operator => tools/release-operator}/README.md (100%) rename {release-operator => tools/release-operator}/src/github.rs (100%) rename {release-operator => tools/release-operator}/src/main.rs (100%) rename {release-operator => tools/release-operator}/src/registry.rs (100%) rename {release-operator => tools/release-operator}/src/release.rs (100%) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e1d1eff92..6da5a67d8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -93,11 +93,11 @@ jobs: uses: Swatinem/rust-cache@v1 with: key: release-operator-01 - working-directory: ./release-operator + working-directory: ./tools/release-operator - name: Operator | Deduce id: release - working-directory: ./release-operator + working-directory: ./tools/release-operator env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_LABEL: release @@ -130,7 +130,7 @@ jobs: - name: Release | Crates.io if: ${{ steps.release.outputs.release-detected == 'true' }} - working-directory: ./release-operator + working-directory: ./tools/release-operator env: RUST_LOG: info run: | diff --git a/Cargo.toml b/Cargo.toml index 982bb6c47..1b41354cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ members = [ "models/spacer", "models/star", - "release-operator", + "tools/release-operator", ] default-members = [ "crates/fj-app", diff --git a/release-operator/Cargo.toml b/tools/release-operator/Cargo.toml similarity index 100% rename from release-operator/Cargo.toml rename to tools/release-operator/Cargo.toml diff --git a/release-operator/README.md b/tools/release-operator/README.md similarity index 100% rename from release-operator/README.md rename to tools/release-operator/README.md diff --git a/release-operator/src/github.rs b/tools/release-operator/src/github.rs similarity index 100% rename from release-operator/src/github.rs rename to tools/release-operator/src/github.rs diff --git a/release-operator/src/main.rs b/tools/release-operator/src/main.rs similarity index 100% rename from release-operator/src/main.rs rename to tools/release-operator/src/main.rs diff --git a/release-operator/src/registry.rs b/tools/release-operator/src/registry.rs similarity index 100% rename from release-operator/src/registry.rs rename to tools/release-operator/src/registry.rs diff --git a/release-operator/src/release.rs b/tools/release-operator/src/release.rs similarity index 100% rename from release-operator/src/release.rs rename to tools/release-operator/src/release.rs From 5e8e2646869d0b8b9c2f632a32ec0d257c4aa203 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 13 Apr 2022 15:54:36 +0200 Subject: [PATCH 3/4] Update doc references to release-operator folder --- RELEASES.md | 2 +- tools/release-operator/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 2108ec1d9..28cbec37e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -47,7 +47,7 @@ In the release branch, update the version numbers in the `Cargo.toml` files of a Push the release branch and create a pull request and label it as `release`. Once the CI build completed successfully, merge the pull-request and mention the new version in the commit, e.g. `Release v0.1.2`. -The [release-operator](./release-operator) will run in the scope of GitHub Actions' [CD](./.github/workflows/cd.yml) workflow. It will yield a set of compiled binaries, their checksums and a new GitHub Release with all artifacts attached. +The [release-operator](./tools/release-operator) will run in the scope of GitHub Actions' [CD](./.github/workflows/cd.yml) workflow. It will yield a set of compiled binaries, their checksums and a new GitHub Release with all artifacts attached. Next, publish the release by running `cargo publish` for each crate. diff --git a/tools/release-operator/README.md b/tools/release-operator/README.md index 04ca8f0bf..e410d36fb 100644 --- a/tools/release-operator/README.md +++ b/tools/release-operator/README.md @@ -55,7 +55,7 @@ As seen above, the release operator requires the maintainer to: ### Detect a Release ```shell -# release-operator/ +# tools/release-operator/ cargo run -- detect --sha --label ``` @@ -113,7 +113,7 @@ The release operator defines "outputs" which can be read by subsequent steps wit ### Publish a List of Crates ```shell -# release-operator/ +# tools/release-operator/ cargo run -- publish \ --token \ --crate ../fj \ From 136507aa6a531f0273af91b1fb7e026b1070ca26 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 13 Apr 2022 16:16:30 +0200 Subject: [PATCH 4/4] Improve error message --- crates/fj-app/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/fj-app/src/main.rs b/crates/fj-app/src/main.rs index a252070c8..4551c151b 100644 --- a/crates/fj-app/src/main.rs +++ b/crates/fj-app/src/main.rs @@ -3,7 +3,7 @@ mod config; use std::path::PathBuf; -use anyhow::anyhow; +use anyhow::{anyhow, Context as _}; use fj_export::export; use fj_host::{Model, Parameters}; use fj_operations::shape_processor::ShapeProcessor; @@ -39,7 +39,8 @@ fn main() -> anyhow::Result<()> { })?; path.push(model); - let model = Model::from_path(path, config.target_dir)?; + let model = Model::from_path(path.clone(), config.target_dir) + .with_context(|| format!("Failed to load model: {}", path.display()))?; let parameters = args.parameters.unwrap_or_else(Parameters::empty); let shape_processor = ShapeProcessor {