> NB: Throughout this document, the word "box" always refers to a Rust [`Box<T>`](https://doc.rust-lang.org/std/boxed/struct.Box.html), a heap allocated pointer to T, and not the Smithy concept of boxed vs. unboxed.
> Note: Throughout this document, the word "box" always refers to a Rust [`Box<T>`](https://doc.rust-lang.org/std/boxed/struct.Box.html), a heap allocated pointer to T, and not the Smithy concept of boxed vs. unboxed.
Recursive shapes pose a problem for Rust, because the following Rust code will not compile:
Rust currently has no standard library or universally accepted large-number crate. Until one is stabilized, a string representation is a reasonable compromise:
@@ -25,7 +25,7 @@ pub struct BigDecimal(String);
This will enable us to add helpers over time as requested. Users will also be able to define their own conversions into their preferred large-number libraries.
As of 4/17/2021 BigInteger / BigDecimal are not included in AWS models. Implementation is tracked [here](https://github.com/awslabs/smithy-rs/issues/312).
As of 5/23/2021 BigInteger / BigDecimal are not included in AWS models. Implementation is tracked [here](https://github.com/awslabs/smithy-rs/issues/312).
### Timestamps
[chrono](https://github.com/chronotope/chrono) is the current de facto library for datetime in Rust, but it is pre-1.0. Instants are represented by an SDK defined structure modeled on `std::time::Duration` from the Rust standard library.
@@ -55,4 +55,4 @@ Smithy defines the concept of "Document Types":
Individual protocols define their own document serialization behavior, typically by creating a newtype around `Document` that implements `serde::Serialize/serde::Deserialize`. See [Document Json Serialization](https://github.com/awslabs/smithy-rs/blob/138320e99e6c7aaf14217d07cf996ba07349dd5e/rust-runtime/inlineable/src/doc_json.rs)
Individual protocols define their own document serialization behavior, with some protocols such as AWS and EC2 Query not supporting document types.
> Unless you know better ones! These are our tenets today, but we'd love your thoughts. Do you wish we had different priorities? Let us know by opening and issue or starting a discussion.
1.[**Batteries included, but replaceable.**](#batteries-included-but-replaceable) The AWS SDK for Rust should provide a best-in-class experience for many use cases, **but**, customers will use the SDK in unqiue and unexpected ways. **Meet customers where they are;** strive to be compatible with their tools. Provide mechanisms to allow customers make different choices.
1.[**Batteries included, but replaceable.**](#batteries-included-but-replaceable) The AWS SDK for Rust should provide a best-in-class experience for many use cases, **but**, customers will use the SDK in unique and unexpected ways. **Meet customers where they are;** strive to be compatible with their tools. Provide mechanisms to allow customers make different choices.
2.[**Make common problems easy to solve.**](#make-common-problems-easy-to-solve) The AWS SDK for Rust should uncommon problems solvable. Guide customers to patterns that set them up for long-term success.
3.[**Design for the Future.**](#design-for-the-future) The AWS SDK for Rust should evolve with AWS without breaking existing customers. APIs will evolve in unpredictable directions, new protocols will gain adoption, and new services will be created that we never could have imagined. Don’t simplify or unify code today that prevents evolution tomorrow.