Skip to content

Conversation

winderica
Copy link

This PR adds feature gates for cli, r1cs, kimchi, and server. It allows downstream libraries to select desired features instead of enabling all of them.

The version of arkworks libraries is also bumped to the latest.

@mimoo
Copy link
Contributor

mimoo commented Oct 1, 2025

can I ask you why you're doing this or looking into noname?

@winderica
Copy link
Author

Hey @mimoo! I am opening this PR because recently I tried to bump the version of dependencies to latest in Sonobe, which has experimental support for DSLs including Noname, but I faced some compilation issues when targeting wasm.

Then I realized that Noname provides some functionalities that are useful as a CLI tool, and for this purpose it depends on wasm-unfriendly libraries such as tokio. On the other hand, Sonobe (and maybe some other downstream projects) imports Noname only for constraint synthesis/witness extraction. To allow for both use cases, I added feature gates to Noname, so that normal users can continue to enjoy all functionalities of Noname as a binary, while projects that use Noname as a library can disable unused features.

@@ -1,3 +1,4 @@
#[cfg(feature = "server")]
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just gate the whole server module in src/lib.rs ?

Copy link
Contributor

Choose a reason for hiding this comment

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


/// Field element helpers
/// Unless otherwise stated everything is in little-endian byte order.
pub trait FieldHelpers<F> {
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -1,3 +1,5 @@
#[cfg(feature = "kimchi")]
mod examples;
Copy link
Contributor

Choose a reason for hiding this comment

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

feels weird to gate this under kimchi, but I guess maybe less painful than add the feature gate within examples?

Cargo.toml Outdated

[features]
default = ["cli"]
cli = ["kimchi", "server"]
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to have a cli feature? Maybe call this full instead?

@mimoo
Copy link
Contributor

mimoo commented Oct 8, 2025

that makes sense! Thanks so much for the PR then :) I added a few comments, do you think you can address them? If so I think I could merge this

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.

2 participants