Skip to content

Conversation

@Pratyush
Copy link
Member

@Pratyush Pratyush commented Sep 9, 2020

Blocked on #186

PR #186 improved the ergonomics of writing constraints and gadgets, but regressed the ergonomics of profiling and debugging constraints. This PR attempts to rectify that by moving to an API based on the tracing crate. To enter a namespace, simply annotate the relevant function with the tracing::instrument attribute, with target = "r1cs":

#[tracing::instrument(target = "r1cs")]
fn some_gadget(...) -> Something {
	///...
}

See r1cs_std for examples.

Closes #250

@Pratyush Pratyush force-pushed the constraint-tracing branch 2 times, most recently from 3835593 to 5f54116 Compare September 10, 2020 22:01
@Pratyush Pratyush force-pushed the constraint-tracing branch 2 times, most recently from 723446f to 320a972 Compare September 11, 2020 23:29
@Pratyush Pratyush merged commit 4e9e5b1 into master Sep 12, 2020
@Pratyush Pratyush deleted the constraint-tracing branch September 12, 2020 04:54
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.

Use #[track_caller] to make automated namespacing useful

1 participant