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

Add serde default attribute to compile config to accept partial objects #1023

Merged
merged 4 commits into from
Oct 3, 2021

Conversation

dark64
Copy link
Member

@dark64 dark64 commented Sep 29, 2021

This does not work currently:

zokrates.compile(source, {
    config: {
      allow_unconstrained_variables: true,
    },
  });

The whole config object must be passed:

zokrates.compile(source, {
    config: {
      allow_unconstrained_variables: true,
      isolate_branches: false,
    },
  });

This PR adds #[serde(default)] to compile config fields so partial configs are accepted.

@dark64 dark64 requested a review from Schaeff September 29, 2021 16:12
@Schaeff
Copy link
Member

Schaeff commented Sep 30, 2021

Nice, note that this is also included in #988

@Schaeff Schaeff merged commit 264e4d3 into develop Oct 3, 2021
@Schaeff Schaeff deleted the fix-compile-config branch October 3, 2021 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants