Skip to content

feat: build and publish preset binaries - #82

Closed
spiral-ladder wants to merge 1 commit into
mainfrom
bing/publish-minimal
Closed

spiral-ladder wants to merge 1 commit into
mainfrom
bing/publish-minimal

Conversation

@spiral-ladder

Copy link
Copy Markdown
Member

Add an optional zapi.presets list to package.json. Each preset is a build of the same step with extra zig build args.

The 1st preset is the mainnet preset (the default) and keeps .node. The 2nd preset is the minimal preset -minimal.node

requireNapiLibrary(dir, preset) selects one at load time. zapi build --preset <name> renames a local build to match.

A preset is bundled into the target packages unless it is marked standalone, in which case prepublish and publish emit it as its own -- packages that are left out of the main package's optionalDependencies, so consumers download it only when they depend on it explicitly.

Motivation: lodestar-z compiles the consensus preset in, and lodestar's minimal-preset spec tests need a minimal binary that production installs should not have to download.

Add an optional zapi.presets list to package.json. Each preset is a
build of the same step with extra zig build args.

The 1st preset is the mainnet preset (the default) and keeps <binaryName>.node.
The 2nd preset is the minimal preset <binaryName>-minimal.node

`requireNapiLibrary(dir, preset)` selects one at load time.
`zapi build --preset <name>` renames a local build to match.

A preset is bundled into the target packages unless it is marked
standalone, in which case prepublish and publish emit it as its own
<name>-<preset>-<target> packages that are left out of the main
package's `optionalDependencies`, so consumers download it only when
they depend on it explicitly.

Motivation: lodestar-z compiles the consensus preset in, and lodestar's
minimal-preset spec tests need a minimal binary that production
installs should not have to download.
@spiral-ladder

Copy link
Copy Markdown
Member Author

putting this in draft first bc a lot of the text is still quite slop/verbose, i want to trim it down

@nazarhussain

Copy link
Copy Markdown
Contributor

We don't need it anymore.

@github-project-automation github-project-automation Bot moved this from In Progress to Done in Lodestar Team Coordination Oct 30, 2026
@nazarhussain
nazarhussain deleted the bing/publish-minimal branch October 30, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants