Rebase ESM + Vite/Vitest onto CIOS/MSM stack#76
Open
OBrezhniev wants to merge 3 commits into
Open
Conversation
CJS -> ESM across src/tools/tests/index.js (module.exports/require ->
export/import), Rollup-less build -> Vite (build/main.cjs for the require
condition), Mocha -> Vitest, flat eslint.config.js, CI workflow. Ports the
colleague's feat/esm-migration conversion, but keeps OUR rewritten hot files
(build_f1m.js CIOS/no-carry, build_multiexp.js signed-digit, the opSub call
sites in build_curve_jacobian_a0.js, build_fft reverse-permutation export,
bigint isKnownPrime) — ESM-converted in place — plus our AssemblyScript
msm_batch module and its build tool. index.js kept as ours (no broken
bn128_wasm_gzip export). Verified: CJS require() and ESM import() both resolve
{buildBn128, buildBls12381, buildF1m}; 87 tests pass; bn128/bls12381/msm_batch
wasm regenerated.
mnt6753 (legacy curve, unused by the iden3 stack) is excluded from build:wasm
and its test: its pedersen-table/base64 tooling needs a separate ESM pass.
Member
Author
|
ESM-rebase set — the tooling migration re-applied on top of our optimization stack (rather than replaying the branches), so the MSM/CIOS/memory work is preserved. Review together:
Deviations from feat/esm-migration are called out in each PR body (e.g. binfileutils MAX_BUFFER_SIZE, snarkjs IIFE/bfj, mnt6753 excluded, smart_contracts test deferred). All branches keep git+https commit-ref pins; re-pin if a branch moves. |
This was referenced Jul 4, 2026
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.
Rebase ESM migration onto our CIOS/MSM stack (ES modules + Vite/Vitest)
Applies the
feat/esm-migrationCJS→ESM conversion on top of ourfeature/msm-signed-bucketswork. Target:feat/esm-migration.(
build/main.cjsfor therequirecondition), Mocha → Vitest, flateslint.config.js, CI.build_f1m.js(CIOS / no-carry),build_multiexp.js(signed-digit),the
opSubcall sites inbuild_curve_jacobian_a0.js, the__reversePermutationexport inbuild_fft.js,isKnownPrimeinbigint.js— plus our AssemblyScript
msm_batchmodule and its build tool.index.jskept as ours (nobn128_wasm_gzipexport — that file isn't built).require()andimport()resolve{ buildBn128, buildBls12381, buildF1m }.Note: mnt6753 (legacy curve, unused by the iden3 stack) is excluded from
build:wasmand its Vitest run — its pedersen-table / base64 build toolingneeds a separate ESM pass (the same break exists on
feat/esm-migration).Validation: 87 tests pass; bn128/bls12381/msm_batch wasm regenerated.