feat(wasm): unify editor builds — footprint/symbol editors via runtime --frame
The footprint and symbol editors are no longer separate WASM bundles: the frontend loads the parent pcbnew/eeschema bundle and passes --frame=fpedit / --frame=symedit (TOOL_BUNDLE + TOOL_FRAME -> Module.arguments in boot). Drops the two duplicate build+deploy targets and their wrapper scripts + vestigial embind; adds low-level harnesses (footprint_editor.html, symbol_editor.html) and a runtime-frame spec. Bumps the kicad submodule to the runtime --frame launcher. The frame-runtime spec is listed in PCBNEW_FAMILY_SPECS so CI routes it to the chromium-ci (V8) project — its footprint case boots the pcbnew module, which OOMs SpiderMonkey on x86 CI. Includes the editor-unification dossier (research docs 01-04 + the as-built implementation record 05). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
c005e1ba73
commit
c6716e6b60
22 changed files with 1066 additions and 103 deletions
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Embind bindings for KiCad symbol_editor WASM.
|
||||
*
|
||||
* Picked up automatically by scripts/kicad/build-kicad-target.sh when building
|
||||
* the symbol_editor app (it compiles wasm/bindings/<app>_embind.cpp if present).
|
||||
*
|
||||
* The symbol editor is the eeschema kiface launched with
|
||||
* TOP_FRAME=FRAME_SCH_SYMBOL_EDITOR, so it links the same
|
||||
* eeschema_kiface_objects as eeschema — including files-io.cpp, whose save
|
||||
* chokepoint references kicadCollabOnSave. eeschema gets the definition from
|
||||
* eeschema_embind.cpp; this TU provides it for the symbol_editor link.
|
||||
* eeschema's other bindings are not pulled in here: they assume a
|
||||
* SCH_EDIT_FRAME top frame, which this app doesn't have.
|
||||
*/
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
|
||||
// C++ → JS save notification (standalone-hardening save routing). Called from
|
||||
// the kicad fork's save chokepoints after a successful write to MEMFS, so the
|
||||
// web app can route the saved bytes onward (API upload, local-disk write-back,
|
||||
// download). No-op without a JS listener.
|
||||
extern "C" void kicadCollabOnSave( const char* aPath )
|
||||
{
|
||||
EM_ASM( {
|
||||
if( window.kicadCollab && window.kicadCollab.onSave )
|
||||
window.kicadCollab.onSave( UTF8ToString( $0 ) );
|
||||
}, aPath );
|
||||
}
|
||||
|
||||
#endif // __EMSCRIPTEN__
|
||||
Loading…
Reference in a new issue