Rust-Kern Etappe 0 + erster Teil Etappe 1: Crate dossier-core (src-tauri/core), einmal geladen, synchron aufgerufen; Polygon-Booleans aus Rust (i_overlay) ersetzen polygon-clipping
- src-tauri/core: flache f64-Kodierung fuer die WASM-Grenze, Polygon-Booleans (Vereinigung/Differenz/Schnitt, Umlaufsinn-unabhaengig wie polygon-clipping, Unsinn verworfen statt Panic); cargo-Tests - engine/coreWasm.ts: initCore() vor dem ersten Render (main.tsx, alle Fenster), CLI mit Byte-Provider, Vitest per Setup-Datei; core() synchron - geometry/polygonBool.ts: Fassade mit gleicher Datenform; Schatten, Baurecht, Aussenbemassung, Dach-Skelett, Aussparungen und 2D-Booleans umgestellt; polygon-clipping aus den Abhaengigkeiten entfernt (Lockfile wieder synchron mit package.json) - Tests: Walm auf L prueft Dachebenen statt Zahl konvexer Stuecke, Aussparung mikrometergenau (Ganzzahlraster) - check.mjs/CI bauen und testen das neue Crate; CLAUDE.md: neuer Kern-Code entsteht in Rust Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
29 files changed
+1238
-157
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// Vitest-Setup: Rust-Kern synchron laden, damit Kern-Funktionen in jedem Test verfügbar sind.
|
||||
// Fehlt das Paket, bricht jeder Test mit einem Hinweis ab (vorher `npm run build:core`).
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { initCoreSync } from "./coreWasm";
|
||||
|
||||
const file = fileURLToPath(new URL("./pkgCore/core_bg.wasm", import.meta.url));
|
||||
let bytes: Buffer;
|
||||
try {
|
||||
bytes = readFileSync(file);
|
||||
} catch {
|
||||
throw new Error(`Rust-Kern fehlt (${file}): zuerst \`npm run build:core\`.`);
|
||||
}
|
||||
initCoreSync(new Uint8Array(bytes));
|
||||
Reference in new issue
Block a user