From f5a82152394fde4d8f740f664ab7737b82861618 Mon Sep 17 00:00:00 2001 From: cashmere Date: Tue, 28 Jul 2026 19:41:16 +0200 Subject: feat: GPUI desktop port foundation - scene crate: full project/scene/element model, serde round-trip proven against the web SerializedProject shape - transfer crate: .ocp zip container, cross-compat with web fflate archives proven in both directions - storage crate: filesystem project store replacing IndexedDB, .ocp import/export - media crate: ffmpeg-next 8 decoder (frames, audio, thumbnails, waveform summaries) - playback crate: wall-clock anchored, frame-rounded playback clock - gpu crate: native texture readback; compositor renders headless offscreen on Vulkan (spike test) - flake devshell: rust toolchain, GPUI native deps, ffmpeg dev, bindgen clang args; GPUI hello-world builds - port plan in notes/gpui-port.md --- script/cross-check.ts | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 script/cross-check.ts (limited to 'script') diff --git a/script/cross-check.ts b/script/cross-check.ts new file mode 100644 index 00000000..4ea430ba --- /dev/null +++ b/script/cross-check.ts @@ -0,0 +1,49 @@ +import { readFileSync, writeFileSync } from "node:fs"; +import { + buildProjectArchive, + parseProjectArchive, +} from "../apps/web/src/project/transfer/container"; + +const direction = process.argv[2]; + +if (direction === "build") { + const projectJson = JSON.stringify({ + version: 7, + metadata: { id: "web-built" }, + nested: { value: 42 }, + }); + const archive = buildProjectArchive({ + projectJson, + media: [ + { + metadata: { + id: "web-asset", + name: "web clip.mov", + mediaType: "video", + fileType: "video/quicktime", + lastModified: 1_753_000_000_000, + width: 1280, + height: 720, + duration: 3.25, + }, + data: new Uint8Array([9, 8, 7, 6]), + }, + ], + }); + writeFileSync("/tmp/web-built.ocp", archive); + console.log("web-built.ocp written"); +} else if (direction === "parse") { + const archive = readFileSync("/tmp/rust-built.ocp"); + const parsed = parseProjectArchive({ archive }); + console.log( + JSON.stringify({ + project: parsed.project, + media: parsed.media, + firstBytes: Array.from( + parsed.readMediaData({ entry: parsed.media[0]?.entry ?? "" }), + ), + }), + ); +} else { + throw new Error("usage: bun cross-check.ts build|parse"); +} -- cgit v1.3.1