Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smithy rust doesn't supported arbitrary precision numbers in Document type #1769

Closed
DanielBauman88 opened this issue Sep 26, 2022 · 4 comments

Comments

@DanielBauman88
Copy link
Contributor

Smithy rust does not support arbitrary precision numbers in the Document type.
Would adding this functionality be something that the smithy team would support (for rust and other languages)?
I'm asking about supporting this in principle, not asking for a commitment to deliver this, rather if you would be open to PRs to support this functionality.

Quoting from the smithy idl 2.0 - https://awslabs.github.io/smithy/2.0/spec/simple-types.html#document
a JSON-like data model and can contain UTF-8 strings, arbitrary precision numbers, booleans...

The Document type contains type Number which only supports u64, i64 or f64 values. The comments indicate that the implementation was modelled on serde but support for arbitrary precision was not implemented.

@jdisanti
Copy link
Collaborator

I think implementing #312 would add this since we would need to add additional arbitrary precision variants to the existing Number type.

@DanielBauman88
Copy link
Contributor Author

DanielBauman88 commented Sep 26, 2022

Yeah that would resolve this too - as long as changes to serialization/deserialization were piped in to use those options when deserializing/serializing numbers.
eg: https://github.com/awslabs/smithy-rs/blob/main/rust-runtime/aws-smithy-json/src/deserialize.rs#L325

Is there anywhere to create issues for smithy implementations in general? This ideally would be something tracked accross all languages so that smithy apis have the same support from clients in different languages.

Related issue for typescript.

@jdisanti
Copy link
Collaborator

Is there anywhere to create issues for smithy implementations in general?

I don't think there is anything like this today. The most central location would be https://github.com/awslabs/smithy, but that really tracks the Java implementation for parsing IDL and the core logic for building Smithy code generators.

@goabv
Copy link

goabv commented Jan 30, 2023

Based on the communication thread closing this issue as this is connected to #312 and can be tracked there

@goabv goabv closed this as completed Jan 30, 2023
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

No branches or pull requests

3 participants