-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
@@ -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") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this do?
There was a problem hiding this 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 constant
s are required so that the js tests work properly.
-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