@holistics/cli-core 2.3.27 → 2.3.29-internal.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,6 +20,15 @@ This is possible because we already compiled the code into a single `commands.js
20
20
 
21
21
  If `bun` is not installed at the local, the build will be skipped.
22
22
 
23
+ ## Native binaries
24
+
25
+ `@holistics/hwip` is a Rust addon with one `.node` binary per platform. The CLI app only extracts the tarball and never runs `npm install`, so the published package must carry the binaries for every platform the CLI app ships for (`napi.targets` in `packages/hwip/package.json`):
26
+
27
+ - `vendor_hwip.mjs` puts `hwip.<platform>.node` for each target into `packages/hwip/dist`. It downloads them from the `@holistics/hwip-<platform>` packages on GitHub Packages, at the version in `packages/hwip/package.json`, using `npm pack`. So it needs the `@holistics` registry and token in `~/.npmrc`, which CI sets up. End users never need that access: the binaries end up inside the public `cli-core` tarball. Locally it only downloads the binaries that are missing, so your own build of hwip is kept. If a download fails, it prints a warning. On CI it downloads all of them and fails if one is missing, so **release hwip before publishing a cli-core that needs that version**.
28
+ - `bun build` copies each binary the hwip loader `require`s into `dist/` as `hwip.<platform>-<hash>.node` and points the `require` at the copy. A binary that is missing at build time becomes a `throw` in the bundle. That is why `bun_build.sh` then checks that `dist/` has one binary per target.
29
+
30
+ This adds about 10 MB per platform to the tarball. `@holistics/aml` needs none of this: `cli-core` uses its default TypeScript parser, and its native parser loads only on request (`AML_PARSER_BACKEND=rust-napi`).
31
+
23
32
  ## Quick run
24
33
  For quickly testing the build file, can use the below command to run
25
34