feat: kicad_tools headless CLI
One merged node-WASM CLI (wasm/tools, 26.5MB) supersedes sym_convert + pcb_convert: --convert-lib (absolutizes paths — fixes the legacy plugin's silent empty output on relative paths), --lint (now full-parses .kicad_pcb via the linked pcbnew parser), --erc, --netlist, --bom, --plot, --drc. Registered as the only headless CLI app; ASYNCIFY=0 CLIs skip the nanosleep→Asyncify yield shim and exit via _exit (dieted static dtors trap). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADzCSeN3Q9DJL3YW2FZTXB
This commit is contained in:
parent
396d4c1d45
commit
ad9c4675f9
12 changed files with 1304 additions and 86 deletions
9
wasm/bindings/kicad_tools_embind.cpp
Normal file
9
wasm/bindings/kicad_tools_embind.cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// kicad_tools' "embind" object — deliberately embind-free, mirroring
|
||||
// sym_convert_embind.cpp / pcb_convert_embind.cpp (ysync 0009 size research).
|
||||
//
|
||||
// Both dieted kifaces reference exactly ONE editor-embind symbol:
|
||||
// kicadCollabOnSave (eeschema files-io.cpp / pcbnew files.cpp save paths —
|
||||
// neither executes headless, and both TUs are pruned from the diets anyway).
|
||||
// This no-op hook satisfies any remaining reference without rooting the
|
||||
// editor surface.
|
||||
extern "C" void kicadCollabOnSave( const char* /* aPath */ ) {}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// sym_convert's "embind" object — deliberately embind-free (ysync 0009 size
|
||||
// research, step (a)).
|
||||
//
|
||||
// The eeschema kiface references exactly ONE symbol from the editor's embind
|
||||
// TU: kicadCollabOnSave (files-io.cpp, called from SCH_EDIT_FRAME::SaveEEFile —
|
||||
// a path the headless converter never executes). Linking the real
|
||||
// eeschema_embind.o for that one symbol roots the ENTIRE editor surface from
|
||||
// .init_array (EMSCRIPTEN_BINDINGS takes the address of every bound function:
|
||||
// kicadOpenFile → frames/tools/dialogs, collab bridge, presence → GAL), which
|
||||
// GC cannot remove. This no-op hook satisfies the reference instead.
|
||||
extern "C" void kicadCollabOnSave( const char* /* aPath */ ) {}
|
||||
Loading…
Reference in a new issue