Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devex improvements + testing #45

Merged
merged 18 commits into from
Dec 14, 2023
Merged

devex improvements + testing #45

merged 18 commits into from
Dec 14, 2023

Conversation

rpalakkal
Copy link
Contributor

@rpalakkal rpalakkal commented Nov 22, 2023

-autogenerate halo2-lib-js docs
-allow constants to be passed to all halo2-lib functions
-make halo2-lib-js context global (to avoid passing around context)
-halo2-lib-js unit testing in CI (vk equivalence with rust for every function, and js constant -> CircuitValue auto conversion testing)

before merging, halo2-lib-js version should be updated and published

closes #17

@rpalakkal rpalakkal marked this pull request as ready for review November 28, 2023 22:42
@rpalakkal rpalakkal changed the title feat: devex improvements devex improvements + testing Nov 28, 2023
@@ -12,8 +12,26 @@ export async function getFunctionFromTs(relativePath: string, shouldCircuitFunct
compilerOptions: { module: ts.ModuleKind.CommonJS }
});
const script = new vm.Script(result.outputText);
const customRequire = (moduleName: string) => {
try {
if (moduleName === "@axiom-crypto/halo2-lib-js") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this do?

Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I enjoyed the js tests.

Perhaps make a note somewhere in the halo2-wasm tests that the constants are required so that the js tests work properly.

halo2-lib-js/package.json Outdated Show resolved Hide resolved
halo2-lib-js/tests/test_constant.py Show resolved Hide resolved
@ytham ytham merged commit 55846d5 into main Dec 14, 2023
2 checks passed
@ytham ytham deleted the feat/devex branch December 14, 2023 19:38
ytham added a commit that referenced this pull request Dec 14, 2023
ytham added a commit that referenced this pull request Dec 14, 2023
@rpalakkal rpalakkal restored the feat/devex branch December 18, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-generate .d.ts string from halo2-lib-js function docstrings
3 participants