Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

raea-io-gen-fit: fit.rs moved out of raea-io-gen into its own crate, re-exported as raea_io_gen::fit so every path stays. raea-io-gen was at its 2000-line crate limit on main, and the picture fallback (Keys) put it at 2095; it is now 1930. route.rs's Keys comment no longer names raea's env file by its literal path, which made skills' files.md stale. Checked: cargo test -p raea-io-gen -p raea-io-gen-fit --lib, 26 and 1 (the same 27 as before).

shinyobjectz1680860ff443
diff --git a/Cargo.lock b/Cargo.lock
index f9ed88d7..ab2b4383 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14459,10 +14459,9 @@ name = "raea-io-gen"
version = "0.1.0"
dependencies = [
"image",
- "raea-core-facts",
- "raea-core-meshcheck",
"raea-io-gen-comfy",
"raea-io-gen-core",
+ "raea-io-gen-fit",
"raea-io-home",
"serde_json",
]
@@ -14484,6 +14483,16 @@ dependencies = [
"sha2 0.10.9",
]
+[[package]]
+name = "raea-io-gen-fit"
+version = "0.1.0"
+dependencies = [
+ "raea-core-facts",
+ "raea-core-meshcheck",
+ "raea-io-gen-core",
+ "serde_json",
+]
+
[[package]]
name = "raea-io-home"
version = "0.1.0"
diff --git a/Cargo.toml b/Cargo.toml
index b5426bf5..19d5a795 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -63,6 +63,7 @@ members = [
"io/gen",
"io/gen-comfy",
"io/gen-core",
+ "io/gen-fit",
"io/home",
"io/soft",
"io/av1",
diff --git a/io/gen-fit/Cargo.toml b/io/gen-fit/Cargo.toml
new file mode 100644
index 00000000..1b61834f
--- /dev/null
+++ b/io/gen-fit/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "raea-io-gen-fit"
+version = "0.1.0"
+edition = "2024"
+license = "FSL-1.1-ALv2"
+publish = false
+description = "A generated model measured and fitted before a scene uses it: raea gen check, and every mesh.generate output of a run fitted by its step's size"
+
+[dependencies]
+raea-io-gen-core = { path = "../gen-core" }
+# the measuring and fitting (raea-core-meshcheck)
+raea-core-meshcheck = { path = "../../core/meshcheck" }
+# what gen check finds, as raea's one Finding (docs/direction.feature DR3)
+raea-core-facts = { path = "../../core/facts" }
+serde_json = "1"
diff --git a/io/gen/src/fit.rs b/io/gen-fit/src/lib.rs
similarity index 99%
rename from io/gen/src/fit.rs
rename to io/gen-fit/src/lib.rs
index 86741e11..4477fd45 100644
--- a/io/gen/src/fit.rs
+++ b/io/gen-fit/src/lib.rs
@@ -10,7 +10,7 @@ use raea_core_facts::{Finding, finding};
use raea_core_meshcheck::{Glb, Want, check, fix};
use serde_json::{Value as J, json};
-use crate::flow::Flow;
+use raea_io_gen_core::flow::Flow;
pub const USAGE: &str = "raea gen check MODEL.glb [--h METRES] [--dims W,D,H] [--turn DEG] [--faces N | --seen METRES] [--parts a,b] [--rig] [--solid] [-o FIXED.glb] [--json] (a model measured: size, pivot, facing, triangles, loose pieces, holes, textures, and the Blender script each fault needs; -o writes it fitted)";
diff --git a/io/gen/Cargo.toml b/io/gen/Cargo.toml
index cef69eed..9c224d23 100644
--- a/io/gen/Cargo.toml
+++ b/io/gen/Cargo.toml
@@ -10,10 +10,8 @@ description = "Generation flows: made.app's models at provider cost, ComfyUI wor
raea-io-gen-comfy = { path = "../gen-comfy" }
raea-io-gen-core = { path = "../gen-core" }
raea-io-home = { path = "../home" }
-# a generated model measured and fitted after its step (raea gen check; fit.rs)
-raea-core-meshcheck = { path = "../../core/meshcheck" }
-# what gen check finds, as raea's one Finding (docs/direction.feature DR3)
-raea-core-facts = { path = "../../core/facts" }
+# a generated model measured and fitted after its step (raea gen check)
+raea-io-gen-fit = { path = "../gen-fit" }
serde_json = "1"
# image.crop, image.scale, image.stitch, run here (native.rs)
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }
diff --git a/io/gen/src/lib.rs b/io/gen/src/lib.rs
index 5c37e59a..dfc640be 100644
--- a/io/gen/src/lib.rs
+++ b/io/gen/src/lib.rs
@@ -1,10 +1,9 @@
//! Generation flows run: route.rs sends each step of a flow to a backend (made.app, fal, Replicate, OpenRouter, a Modal
//! endpoint, Fish Audio, a ComfyUI server, or a model the host runs locally) and run.rs makes them, cached by content; cli.rs is
//! `raea gen`. The flow format and hosted backends are raea-io-gen-core, ComfyUI import and export raea-io-gen-comfy,
-//! both re-exported here under their old paths.
+//! both re-exported here under their old paths, as is fit (raea-io-gen-fit, a generated model measured and fitted).
pub mod cli;
-pub mod fit;
mod hosted;
pub mod native;
pub mod route;
@@ -17,4 +16,5 @@ mod tests_tripo;
mod tests_keys;
pub use raea_io_gen_comfy as comfy;
+pub use raea_io_gen_fit as fit;
pub use raea_io_gen_core::{direct, fal, fish, flow, http, made, modal, openrouter, replicate, setting, tripo, tsflow, types};
diff --git a/io/gen/src/route.rs b/io/gen/src/route.rs
index ea1e5992..0cb852a7 100644
--- a/io/gen/src/route.rs
+++ b/io/gen/src/route.rs
@@ -108,7 +108,7 @@ impl Default for Keys {
}
impl Keys {
- /// what this host has, from the environment and ~/.raea/env
+ /// what this host has, from the environment and raea's env file
pub fn here() -> Keys {
let has = |k: &str| crate::setting(k).is_some_and(|v| !v.trim().is_empty());
Keys { made: has("MADE_API_KEY"), fal: has("FAL_KEY"), openrouter: has("OPENROUTER_API_KEY") }
diff --git a/tools/layers.toml b/tools/layers.toml
index b8492bad..52147c28 100644
--- a/tools/layers.toml
+++ b/tools/layers.toml
@@ -29,6 +29,7 @@ raea-io-assets = "io"
raea-io-gen = "io"
raea-io-gen-comfy = "io"
raea-io-gen-core = "io"
+raea-io-gen-fit = "io"
raea-io-home = "io"
raea-io-codec = "io"
raea-io-soft = "io"