Skip to content

Specify main via attribute instead of reserved name#295

Merged
tim-hoffman merged 7 commits intomainfrom
th/specify_main_via_attr
Jan 29, 2026
Merged

Specify main via attribute instead of reserved name#295
tim-hoffman merged 7 commits intomainfrom
th/specify_main_via_attr

Conversation

@tim-hoffman
Copy link
Member

@tim-hoffman tim-hoffman commented Jan 29, 2026

This changes the means of specifying the main entry point struct from a reserved name "Main" to an attribute on the top module. Also changes the parameter type restriction on the main struct from !struct.type<@Signal> to !felt.type (and comments that Signal is deprecated, soon to be removed).

Consequently, resolves #294

@tim-hoffman tim-hoffman requested a review from a team January 29, 2026 19:37
@iangneal
Copy link
Contributor

Should resolve #294 yes?

@tim-hoffman
Copy link
Member Author

Should resolve #294 yes?

yes

Copy link
Contributor

@iangneal iangneal left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but can we also add a test case for using a struct with parameters as the main component?

@tim-hoffman
Copy link
Member Author

Overall LGTM, but can we also add a test case for using a struct with parameters as the main component?

Good point.

@tim-hoffman tim-hoffman requested review from a team and iangneal January 29, 2026 22:18
@tim-hoffman tim-hoffman merged commit 3a42147 into main Jan 29, 2026
9 checks passed
@tim-hoffman tim-hoffman deleted the th/specify_main_via_attr branch January 29, 2026 23:00
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.

Using "Main" as the main component name conflicts with Circom conventions

2 participants