-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
What is the feature you would like to see?
Introduce feature flags in stellar-tokens, stellar-access, and stellar-contract-utils to allow developers to compile only the modules they need, reducing final contract binary size.
Motivation
When we consolidated ~17 separate crates into grouped modules, we optimized for developer experience but increased contract sizes. For example, stellar-tokens now includes code for fungible, non-fungible, vaults, and RWAs even if a project only needs one.
Proposed Solution
Add Cargo feature flags to the following crates:
stellar-tokens
fungiblenon-fungiblevaultsrwa
stellar-access
ownableroles
stellar-contract-utils
cryptomathmerkle-distributorpausableupgradeable
Usage Example
[dependencies]
stellar-tokens = { version = "x.y.z", default-features = false, features = ["non-fungible"] }Additional Considerations
- Decide on default features (for backward compatibility?)
- Update documentation with feature flag usage
- Consider inter-crate dependencies (e.g. if
rwadepends onfungible)
Metadata
Metadata
Assignees
Labels
No labels