Split up Wasm binaries so Cloudflare deployments stay below 25 MB per file

This commit is contained in:
Keavon Chambers
2026-07-14 14:43:34 -07:00
parent 97f8113fe4
commit 97a43e66fb
6 changed files with 90 additions and 7 deletions
+3 -2
View File
@@ -5,7 +5,8 @@
import type { MessageName, SubscriptionsRouter } from "/src/subscriptions-router";
import { loadDemoArtwork } from "/src/utility-functions/network";
import { operatingSystem } from "/src/utility-functions/platform";
import init, { EditorWrapper, receiveNativeMessage } from "/wrapper/pkg/graphite_wasm_wrapper";
import { initWasm } from "/src/utility-functions/wasm-loader";
import { EditorWrapper, receiveNativeMessage } from "/wrapper/pkg/graphite_wasm_wrapper";
import type { FrontendMessage } from "/wrapper/pkg/graphite_wasm_wrapper";
let subscriptions: SubscriptionsRouter | undefined = undefined;
@@ -13,7 +14,7 @@
onMount(async () => {
// Initialize the editor wrapper
const wrapper = await init();
const wrapper = await initWasm();
for (const [name, f] of Object.entries(wrapper)) {
if (name.startsWith("__node_registry")) f();
}