Skip to content

refactor: move component definitions to project files - #3587

Open
TomasArrachea wants to merge 10 commits into
nextfrom
tomasarrachea-schema-definitions
Open

refactor: move component definitions to project files#3587
TomasArrachea wants to merge 10 commits into
nextfrom
tomasarrachea-schema-definitions

Conversation

@TomasArrachea

@TomasArrachea TomasArrachea commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #3191.

This PR moves every account component's metadata (name, description, version and storage schema) from Rust into a [package.metadata.account-component] table in its miden-project.toml. Now, the crates' build scripts interpret these manifest entries and embeds the metadata into the package.

@TomasArrachea
TomasArrachea force-pushed the tomasarrachea-schema-definitions branch from 2fac64d to ab49797 Compare August 14, 2026 15:45
@TomasArrachea
TomasArrachea marked this pull request as ready for review August 14, 2026 15:49

@PhilippGackstatter PhilippGackstatter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! I left a few comments, but nothing major.

Not for this PR, but in general for the component metadata we could type most of the slots in a better way. We use word in many places where we could describe values more accurately.

Comment thread crates/miden-protocol-build-utils/src/lib.rs Outdated
Comment thread crates/miden-standards/asm/components/access/pausable/miden-project.toml Outdated
Comment thread crates/miden-standards/asm/components/access/pausable/miden-project.toml Outdated
Comment thread crates/miden-standards/asm/components/faucets/fungible_faucet/miden-project.toml Outdated
Comment thread crates/miden-standards/src/account/access/authority.rs Outdated
Comment thread crates/miden-protocol-build-utils/src/lib.rs Outdated
Comment thread crates/miden-standards/asm/components/faucets/fungible_faucet/miden-project.toml Outdated
Comment thread crates/miden-standards/asm/components/note/note_creator/miden-project.toml Outdated
Comment thread crates/miden-standards/asm/components/upgrade/manager/miden-project.toml Outdated
miden-standards.workspace = true

[package.metadata.account-component]
description = "Basic wallet component for receiving and sending assets"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍🏼

@TomasArrachea
TomasArrachea force-pushed the tomasarrachea-schema-definitions branch from 21666a4 to 1f50338 Compare August 25, 2026 19:35

@PhilippGackstatter PhilippGackstatter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@TomasArrachea TomasArrachea changed the title refactor: move component defintions to project files refactor: move component definitions to project files Aug 26, 2026
@TomasArrachea
TomasArrachea force-pushed the tomasarrachea-schema-definitions branch from 4bbecd5 to 53e5e0b Compare August 26, 2026 21:29
@TomasArrachea

Copy link
Copy Markdown
Collaborator Author

@PhilippGackstatter I pushed 53e5e0b with changes to address https://github.com/0xMiden/protocol/pull/3648/changes#r3863463417. The TokenPolicyManager now declares the asset-callback slots in its schema and they get filtered on component build depending on the configuration.

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.

Move component schema definitions to project files

4 participants