Skip to content

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

Merged
Schaeff merged 4 commits intodevelopfrom
fix-compile-config
Oct 3, 2021
Merged

Add serde default attribute to compile config to accept partial objects#1023
Schaeff merged 4 commits intodevelopfrom
fix-compile-config

Conversation

@dark64
Copy link
Copy Markdown
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
Copy Markdown
Member

Schaeff commented Sep 30, 2021

Nice, note that this is also included in #988

Comment thread changelogs/unreleased/1023-dark64 Outdated
@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