feat(core): introduce side-effect-free core entrypoint#412
Open
gustavovalverde wants to merge 1 commit intozama-ai:mainfrom
Open
feat(core): introduce side-effect-free core entrypoint#412gustavovalverde wants to merge 1 commit intozama-ai:mainfrom
gustavovalverde wants to merge 1 commit intozama-ai:mainfrom
Conversation
Introduce a dedicated `./core` export that exposes utility APIs without triggering WASM bootstrap imports at module load time. This is phase 1 of the modular package architecture and includes build/export wiring plus a regression test to keep the boundary stable.
|
Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @gustavovalverde on file. In order for us to review and merge your code, please sign:
If you already signed one of this document, just wait to be added to the bot config. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some consumers need lightweight utility APIs (for example
KmsEIP712) without triggering WASM/native bootstrap at module import time.Today, those APIs are effectively reachable through
./node/./webentrypoints, which pull initialization paths and transitive WASM/native dependencies. In browser-targeted bundlers, this can cause resolution failures (fs/native paths) or unstable build behavior.Why This Is Needed
This is currently impacting downstream tooling such as
fhevm-mocks:fhevm-mocksneeds relayer-sdk EIP-712 helpers for mock flows.@zama-fhe/relayer-sdk/nodecouples the import to heavy runtime dependencies.A dedicated side-effect-free core surface allows downstream packages to depend on official relayer-sdk utilities without vendoring and without pulling bootstrap dependencies.
Additional context (downstream integration symptom):
@fhevm/mock-utils@0.3.0-4and@zama-fhe/relayer-sdk@0.4.0—0.4.1incompatible with browser bundling gustavovalverde/zentity#85Downstream follow-up using this
./coreentrypoint:What This PR Does
./coreentrypoint for side-effect-free utility imports../core(rollup + API extractor + package exports/files)../coredoes not load WASM bootstrap modules and still exposes expectedKmsEIP712behavior.Scope / Non-goals
./node,./web, or./bundleentrypoints.Validation
npx jest --colors --coverage=false src/core.test.ts