magic/npm/examples/siliwiz.mag

52 lines
1.1 KiB
Plaintext
Raw Normal View History

Add npm package and CI workflows The user-facing layer of the WASM port: a publishable npm package plus the GitHub Actions that build and ship it. * npm/package.json — publishes as `magic-vlsi-wasm`, ESM-only, HPND licensed, version tracks Magic's own VERSION file (8.3.637). Whitelists the published files and exposes index.js + index.d.ts. * npm/index.js, npm/index.d.ts — thin JS/TS wrapper around the four WASM exports. createMagic(opts) returns { init, runCommand, sourceFile, update, FS } so consumers can write into the Emscripten virtual filesystem and dispatch Magic commands from Node.js, browsers or Web Workers. * npm/build.sh — end-to-end build: locates emsdk (via PATH or EMSDK_DIR), runs distclean+configure+make in the right order (techs before mains so embed-files are present), copies magic.js / magic.wasm into npm/. Optional --release, --test, --pack flags. Preserves configure's exec bits across invocations. * npm/pack.sh — produces a reproducible npm tarball by touching every file to the build time and exporting SOURCE_DATE_EPOCH so pacote does not rewrite mtimes to its 1985 fallback. * npm/examples/ — runnable smoke tests for the four common workflows (extract, gds, drc, cif), driven by examples/all.js. Each example is self-contained and uses the bundled siliwiz technology. helpers.js encapsulates the boilerplate. * npm/LICENSE, npm/README.md — license text and consumer-facing docs (install, quick-start, API, examples, build-from-source, license, third-party content notice). * .github/workflows/main.yml — adds a `simple_build_wasm` job that installs a pinned emsdk (3.1.56), builds the WASM module, runs the example test suite and uploads the npm tarball as an artifact. Pinned for reproducibility against the post-build.sh patches; switchable to "latest" by commenting two lines. * .github/workflows/main-aarch64.yml — drops the now-redundant WASM ARM job. WASM is architecture-independent. * .github/workflows/npm-publish.yml — new workflow. Publishes to npm on `v*` tag pushes (manual `workflow_dispatch` supported as a dry-run). Uses the same pinned emsdk and pack.sh. Also sets FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 in both workflows to silence the Node.js 20 deprecation warnings until actions/upload-artifact@v6 ships a Node-24 release.
2026-05-04 13:32:51 +02:00
magic
tech siliwiz
magscale 1 1
timestamp 1776371010
<< nwell >>
rect 95 221 349 377
<< ndiffusion >>
rect 132 85 270 131
<< pdiffusion >>
rect 132 254 270 316
<< psubstratepdiff >>
rect 319 0 382 58
<< nsubstratendiff >>
rect 291 309 338 361
<< polysilicon >>
rect 178 51 217 327
rect 148 179 201 220
<< pdcontact >>
rect 233 264 266 307
rect 132 259 169 312
<< ndcontact >>
rect 236 89 268 127
rect 132 88 166 128
<< polycontact >>
rect 147 185 172 214
<< nsubstratencontact >>
rect 295 330 335 364
<< psubstratepcontact >>
rect 333 8 377 49
<< metal1 >>
rect 39 179 127 218
rect 270 180 366 218
rect 110 179 173 216
rect 229 89 270 307
rect 244 180 284 214
rect 128 264 164 366
rect 132 13 166 130
rect 40 9 374 49
rect 42 334 358 373
rect 29 328 80 377
rect 30 6 81 56
<< labels >>
flabel metal1 s 39 179 127 218 0 FreeSans 240 90 0 0 in
port 2 nsew signal output
flabel metal1 s 270 180 366 218 0 FreeSans 240 90 0 0 out
port 3 nsew signal output
flabel metal1 s 29 328 80 377 0 FreeSans 240 90 0 0 vdd
port 4 nsew signal output
flabel metal1 s 30 6 81 56 0 FreeSans 240 90 0 0 vss
port 5 nsew signal output
<< end >>