-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[natives] expose all feature flags inside NativeContext as an extension #7038
Conversation
1c79058
to
272bce7
Compare
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.
Hmm... I feel like this may not be the best way to expose feature flags to native functions.
Extensions are rather heavy-weight and involve dynamic casting. Instead, you can pass the features to the make_all
function in each crate, which will then pass them down to each native function. I'd also recommend you add a features: Features
field to the SafeNativeContext
and make it available to natives. Notice that SafeNativeContext
already contains the timed features, so we just need to replicate that pattern for features.
I'm aware that |
Makes sense to me! I'll use an |
272bce7
to
fef208a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
Exposes the feature flags inside the Rust implementation of Move native functions. This is useful for the generic elliptic-curves Move module (#6550), which will be upgradeable by feature gating newly-added curves directly inside the Rust natives.