Skip to content

Conversation

siosw
Copy link
Contributor

@siosw siosw commented Oct 14, 2025

closes #1350

Ruint uses const generics to set the size of the uint, I chose to include type aliases for U64, U128, and U256 which are commonly used but i think arguments can be made to include more or less.

It would be nice to avoid repeating the doc string for these but i'm unsure if that's possible.

Also wasn't sure where to add this in the change log so left it for now.

@siosw siosw force-pushed the siosw/ruint-integration branch from c79730b to 70efe2d Compare October 14, 2025 21:17
@siosw
Copy link
Contributor Author

siosw commented Oct 16, 2025

maybe i'm wrong but the CI failure looks unrelated to the PR

@tyranron tyranron added k::integration Related to integration with third-party libraries or systems feature New feature or request labels Oct 17, 2025
@tyranron tyranron added this to the 0.18.0 milestone Oct 17, 2025
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

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

@siosw thank you for your effort!

Don't bother with that test, it's known to be flaky, and there is no way to make it deterministic, unfortunately, since we depend there on nondeterministic compiler output.

Also, I've made few adjustments:

  • Exposed the module fed to #[graphql_scalar] macro as pub, so anyone who desires custom-sized type could just use the module directly (example for doing so is included).
  • Added implementations for U8, U16 and U32 types.

@tyranron tyranron added the lib::ruint Related to `ruint` crate integration label Oct 17, 2025
@tyranron tyranron enabled auto-merge (squash) October 17, 2025 21:03
@tyranron tyranron merged commit 8395f2d into graphql-rust:master Oct 17, 2025
360 of 362 checks passed
@siosw
Copy link
Contributor Author

siosw commented Oct 17, 2025

@tyranron thanks for finishing this up and your work on juniper in general!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request k::integration Related to integration with third-party libraries or systems lib::ruint Related to `ruint` crate integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add optional support for ruint types

2 participants