Skip to content

Conversation

@akiraveliara
Copy link
Member

resolves #1969
requires .NET 9 - do not merge before .NET 9 is released

this pull request enables permissions to scale indefinitely by the change of a single constant (at 512 bits we should consider using 256-bit steps and Vector256 instead, but that'll be a problem for in several decades assuming Discord lives that long without ever changing the fundamentals of their permission system). the permission logic is efficient and well-tested. the naming for the container type may still change - do not consider the API laid out here final.

the minimum size for new permissions is 128-bit for simplicity, not because it's required yet, but it'll be required soon enough regardless, possibly even before a v5 release.

@akiraveliara akiraveliara marked this pull request as ready for review November 7, 2024 20:48
Copy link
Member

@VelvetToroyashi VelvetToroyashi left a comment

Choose a reason for hiding this comment

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

GitHub makes a lot of this unfathomably abhorrent to actually look at, but I'm fond of the changes. I don't see anything major at first-glance, but I'm also partially sleep deprived.

Copy link
Member

@Plerx2493 Plerx2493 left a comment

Choose a reason for hiding this comment

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

Looks good, although the bit math is a bit too high for me after work :when:

@akiraveliara akiraveliara merged commit 527f8cc into master Nov 12, 2024
@akiraveliara akiraveliara deleted the aki/scalable-permissions branch November 12, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permissions in future library versions

3 participants