Skip to content

Commit e7f9894

Browse files
boybookclaude
andauthored
feat: pure C API isolation layer + automated publish pipeline
* feat: add pure C API isolation layer for cross-compiler compatibility Introduce a pure C ABI boundary between the C++/Fortran core library (wsjtx_core) and the Node.js N-API binding (.node). This solves the Windows crash where MSVC-compiled Node.js failed to load MinGW-compiled native extensions due to ABI incompatibility. Architecture: .node (N-API) -> C ABI -> wsjtx_core shared library (C++/Fortran) - New: native/wsjtx_c_api.h and .cpp (pure C interface with opaque handle) - Modified: wsjtx_wrapper to use C API instead of C++ direct linking - Rewritten: CMakeLists.txt with dual-target build (wsjtx_core + .node) - Windows: two-phase build (MinGW core DLL + MSVC .node) - Linux/macOS: single cmake build produces both targets - CI workflow simplified from 773 to ~200 lines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add missing <stdexcept> include and fix macOS dylibbundler conflict - Linux/macOS build failed because std::invalid_argument needs <stdexcept> (MSVC includes it transitively, GCC does not) - macOS packaging failed because libwsjtx_core.dylib was manually copied before dylibbundler tried to copy it as a dependency. Removed manual copy, added build/Release to search paths, and use -of flag for overwrite safety. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove redundant dylibbundler step causing self-copy error on macOS dylibbundler already follows transitive dependencies when processing .node, so it bundles libwsjtx_core.dylib and all its deps (fftw, gfortran, etc.) in a single pass. The second dylibbundler call was redundant and failed because it tried to copy already-bundled files onto themselves. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: automate npm publish and GitHub Release via CI - Add `publish` job to build.yml: triggers only on v* tag push, downloads prebuilds from collect-artifacts, validates all 5 platforms, runs npm publish, and creates GitHub Release with platform archives - Simplify prepublishOnly to just build:ts (CI handles validation) - Remove manual scripts/create-release.sh (now integrated in CI) - Update PUBLISHING.md to reflect the new one-step workflow New release flow: npm version patch && git push --tags → fully automated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: run full encode-decode cycle tests on all platforms Add npm run test:full to CI test steps, which runs the comprehensive test suite including FT8 encode→WAV→decode round-trip verification. This ensures the native binaries actually work end-to-end, not just load. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 81a1452 commit e7f9894

10 files changed

Lines changed: 1205 additions & 1815 deletions

File tree

.github/workflows/build.yml

Lines changed: 174 additions & 668 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
node_modules/
22
build/
3+
build-mingw/
4+
build-core/
35
prebuilds/
46
dist/
7+
.idea/
8+
.claude/
59

610
# FFTW wisdom files (machine-specific optimization cache)
711
fftw_wisdom.dat
812
*.wisdom
9-
hashtable.txt
13+
hashtable.txt
14+
15+
# Build logs
16+
*.log

0 commit comments

Comments
 (0)