Skip to content

Conversation

@tarcieri
Copy link
Member

In #1398 I experimented with making some of the syntax implicit, but as soon as it became clear I also needed to add support for ignoring certain bit sizes and only running code on others that quickly became a bad idea.

This commit changes the syntax to be fully explicit, like a match expression that takes an implicit argument of the number of bits with no other weird rules. If you want the block to appear in the code on e.g. 16-bit targets, they need to be explicitly named.

This commit implements all permutations except for 16 | 32 | 64 since that amounts to no gating whatsoever, which defeats the point of using this crate.

In #1398 I experimented with making some of the syntax implicit, but as
soon as it became clear I also needed to add support for ignoring
certain bit sizes and only running code on others that quickly became a
bad idea.

This commit changes the syntax to be fully explicit, like a `match`
expression that takes an implicit argument of the number of bits with no
other weird rules. If you want the block to appear in the code on e.g.
16-bit targets, they need to be explicitly named.

This commit implements all permutations except for `16 | 32 | 64` since
that amounts to no gating whatsoever, which defeats the point of using
this crate.
@tarcieri tarcieri merged commit f6ab29c into master Jan 19, 2026
5 checks passed
@tarcieri tarcieri deleted the cpubits/explicit-syntax branch January 19, 2026 02:18
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