Avalanche primitive types in Rust (experimental)

Overview

crates.io docs.rs Github Actions

AvalancheGo Compatibility

Crate Version(s) AvalancheGo Version(s) Protocol Version
v0.0.134-155 v1.9.2,v1.9.3 19
v0.0.156-176 v1.9.4 20
v0.0.177-200 v1.9.5 21
v0.0.201+ v1.9.6,v1.9.7 22

Introduction

The avalanche-types crate implements and is the canonical representation of Avalanche primitive types in Rust. Avalanche types are separated by modules and are all under the src directory.

This crate also provides an SDK library for developing subnets in Rust. For the SDK functionality, see src/subnet which contains everything required to build a subnet VM in Rust.

The following VMs were built with the SDK:

Getting Started

Examples can be found in examples and is a good first step to getting an understanding of general usage.

Tutorials

Rust Version

avalanche-types currently works on Rust 1.67 and above as it requires support for the 2021 edition. This project uses the stable toolchain.

Getting Help

First please try find the answer to your question in the code documentation. If more clarification is required, try opening an issue with the question.

Features

The basic types available in this crate are used in other Avalanche Rust projects (e.g., distributed load tester blizzard, avalanche-ops).

License

This project is licensed under the BSD 3.

Comments
  • Update aws-smithy-types requirement from 0.53.1 to 0.54.1

    Update aws-smithy-types requirement from 0.53.1 to 0.54.1

    Updates the requirements on aws-smithy-types to permit the latest version.

    Changelog

    Sourced from aws-smithy-types's changelog.

    January 25th, 2023

    New this release:

    • πŸ› (server, smithy-rs#920) Fix bug in OperationExtensionFutures Future::poll implementation

    January 24th, 2023

    Breaking Changes:

    • ⚠ (server, smithy-rs#2161) Remove deprecated service builder, this includes:

      • Remove aws_smithy_http_server::routing::Router and aws_smithy_http_server::request::RequestParts.
      • Move the aws_smithy_http_server::routers::Router trait and aws_smithy_http_server::routing::RoutingService into aws_smithy_http_server::routing.
      • Remove the following from the generated SDK:
        • operation_registry.rs
        • operation_handler.rs
        • server_operation_handler_trait.rs

      If migration to the new service builder API has not already been completed a brief summary of required changes can be seen in previous release notes and in API documentation of the root crate.

    New this release:

    • πŸ› (server, smithy-rs#2213) @sparse list shapes and map shapes with constraint traits and with constrained members are now supported
    • πŸ› (server, smithy-rs#2200) Event streams no longer generate empty error enums when their operations don’t have modeled errors
    • (all, smithy-rs#2223) aws_smithy_types::date_time::DateTime, aws_smithy_types::Blob now implement the Eq and Hash traits
    • (server, smithy-rs#2223) Code-generated types for server SDKs now implement the Eq and Hash traits when possible

    January 12th, 2023

    New this release:

    • πŸ› (server, smithy-rs#2201) Fix severe bug where a router fails to deserialize percent-encoded query strings, reporting no operation match when there could be one. If your Smithy model uses an operation with a request URI spec containing query string literals, you are affected. This fix was released in aws-smithy-http-server v0.53.1.

    January 11th, 2023

    Breaking Changes:

    • ⚠ (client, smithy-rs#2099) The Rust client codegen plugin is now called rust-client-codegen instead of rust-codegen. Be sure to update your smithy-build.json files to refer to the correct plugin name.
    • ⚠ (client, smithy-rs#2099) Client codegen plugins need to define a service named software.amazon.smithy.rust.codegen.client.smithy.customize.ClientCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).
    • ⚠ (server, smithy-rs#2099) Server codegen plugins need to define a service named software.amazon.smithy.rust.codegen.server.smithy.customize.ServerCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).

    New this release:

    • πŸ› (server, smithy-rs#2103) In 0.52, @length-constrained collection shapes whose members are not constrained made the server code generator crash. This has been fixed.
    • (server, smithy-rs#1879) Servers support the @default trait: models can specify default values. Default values will be automatically supplied when not manually set.
    • (server, smithy-rs#2131) The constraint @length on non-streaming blob shapes is supported.
    • πŸ› (client, smithy-rs#2150) Fix bug where string default values were not supported for endpoint parameters
    • πŸ› (all, smithy-rs#2170, aws-sdk-rust#706) Remove the webpki-roots feature from hyper-rustls
    • πŸ› (server, smithy-rs#2054) Servers can generate a unique request ID and use it in their handlers.

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update aws-smithy-types requirement from 0.53.1 to 0.54.0

    Update aws-smithy-types requirement from 0.53.1 to 0.54.0

    Updates the requirements on aws-smithy-types to permit the latest version.

    Changelog

    Sourced from aws-smithy-types's changelog.

    January 24th, 2023

    Breaking Changes:

    • ⚠ (server, smithy-rs#2161) Remove deprecated service builder, this includes:

      • Remove aws_smithy_http_server::routing::Router and aws_smithy_http_server::request::RequestParts.
      • Move the aws_smithy_http_server::routers::Router trait and aws_smithy_http_server::routing::RoutingService into aws_smithy_http_server::routing.
      • Remove the following from the generated SDK:
        • operation_registry.rs
        • operation_handler.rs
        • server_operation_handler_trait.rs

      If migration to the new service builder API has not already been completed a brief summary of required changes can be seen in previous release notes and in API documentation of the root crate.

    New this release:

    • πŸ› (server, smithy-rs#2213) @sparse list shapes and map shapes with constraint traits and with constrained members are now supported
    • (all, smithy-rs#2223) aws_smithy_types::date_time::DateTime, aws_smithy_types::Blob now implement the Eq and Hash traits
    • (server, smithy-rs#2223) Code-generated types for server SDKs now implement the Eq and Hash traits when possible

    January 12th, 2023

    New this release:

    • πŸ› (server, smithy-rs#2201) Fix severe bug where a router fails to deserialize percent-encoded query strings, reporting no operation match when there could be one. If your Smithy model uses an operation with a request URI spec containing query string literals, you are affected. This fix was released in aws-smithy-http-server v0.53.1.

    January 11th, 2023

    Breaking Changes:

    • ⚠ (client, smithy-rs#2099) The Rust client codegen plugin is now called rust-client-codegen instead of rust-codegen. Be sure to update your smithy-build.json files to refer to the correct plugin name.
    • ⚠ (client, smithy-rs#2099) Client codegen plugins need to define a service named software.amazon.smithy.rust.codegen.client.smithy.customize.ClientCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).
    • ⚠ (server, smithy-rs#2099) Server codegen plugins need to define a service named software.amazon.smithy.rust.codegen.server.smithy.customize.ServerCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).

    New this release:

    • πŸ› (server, smithy-rs#2103) In 0.52, @length-constrained collection shapes whose members are not constrained made the server code generator crash. This has been fixed.
    • (server, smithy-rs#1879) Servers support the @default trait: models can specify default values. Default values will be automatically supplied when not manually set.
    • (server, smithy-rs#2131) The constraint @length on non-streaming blob shapes is supported.
    • πŸ› (client, smithy-rs#2150) Fix bug where string default values were not supported for endpoint parameters
    • πŸ› (all, smithy-rs#2170, aws-sdk-rust#706) Remove the webpki-roots feature from hyper-rustls
    • πŸ› (server, smithy-rs#2054) Servers can generate a unique request ID and use it in their handlers.

    December 12th, 2022

    Breaking Changes:

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update http-manager requirement from 0.0.7 to 0.0.8

    Update http-manager requirement from 0.0.7 to 0.0.8

    Updates the requirements on http-manager to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update rsa requirement from 0.7.2 to 0.8.0

    Update rsa requirement from 0.7.2 to 0.8.0

    Updates the requirements on rsa to permit the latest version.

    Changelog

    Sourced from rsa's changelog.

    0.8.0 (2022-12-17)

    Changed

    • Bump signature crate dependency to v2 (#217, #249)
    • Switch to CryptoRngCore marker trait (#237)
    • Make padding module private (#243)
    • Refactor PaddingScheme into a trait (#244)

    Fixed

    • Benchmark build (#225)

    #217: RustCrypto/RSA#217 #225: RustCrypto/RSA#225 #237: RustCrypto/RSA#237 #243: RustCrypto/RSA#243 #244: RustCrypto/RSA#244 #249: RustCrypto/RSA#249

    0.7.2 (2022-11-14)

    Added

    • Public accessor methods for PrecomputedValues (#221)
    • Re-export signature crate (#223)

    #221: RustCrypto/RSA#221 #223: RustCrypto/RSA#223

    0.7.1 (2022-10-31)

    Added

    • Documentation improvements (#216)

    Changed

    • Ensure PaddingScheme is Send and Sync (#215)

    #215: RustCrypto/RSA#215 #216: RustCrypto/RSA#216

    0.7.0 (2022-10-10) [YANKED]

    NOTE: when computing signatures with this release, make sure to enable the oid crate feature of the digest crate you are using when computing the signature (e.g. sha2, sha3). If the oid feature doesn't exist, make sure you're using the latest versions.

    Added

    • pkcs1v15 and pss modules with SigningKey/VerifyingKey types (#174, #195, #202, #207, #208)
    • 4096-bit default max RsaPublicKey size (#176)
    • RsaPublicKey::new_with_max_size (#176)
    • RsaPublicKey::new_unchecked (#206)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update k256 requirement from 0.11.6 to 0.12.0

    Update k256 requirement from 0.11.6 to 0.12.0

    Updates the requirements on k256 to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update secp256k1 requirement from 0.25.0 to 0.26.0

    Update secp256k1 requirement from 0.25.0 to 0.26.0

    Updates the requirements on secp256k1 to permit the latest version.

    Changelog

    Sourced from secp256k1's changelog.

    0.26.0 - 2202-12-19

    • Update libsecp25k1 to v0.2.0

    0.25.0 - 2022-12-07

    0.24.1 - 2022-10-25

    0.24.0 - 2022-07-20

    0.23.4 - 2022-07-14

    0.23.3 - 2022-06-29

    0.23.2 - 2022-06-27

    0.23.1 - 2022-06-24

    Enable "rand/std_rng" feature when the crate's "rnd-std" feature is enabled.

    0.23.0 - 2022-06-21

    The major change in this version is the increase of the Minimum Supported Rust Version (MSRV) from 1.29 to 1.41.1, this is a big change because it introduces Rust Edition 2018 to the codebase along with all the benefits that brings.

    Breaking changes

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update aws-smithy-types requirement from 0.52.0 to 0.53.1

    Update aws-smithy-types requirement from 0.52.0 to 0.53.1

    Updates the requirements on aws-smithy-types to permit the latest version.

    Changelog

    Sourced from aws-smithy-types's changelog.

    January 12th, 2023

    New this release:

    • πŸ› (server, smithy-rs#2201) Fix severe bug where a router fails to deserialize percent-encoded query strings, reporting no operation match when there could be one. If your Smithy model uses an operation with a request URI spec containing query string literals, you are affected. This fix was released in aws-smithy-http-server v0.53.1.

    January 11th, 2023

    Breaking Changes:

    • ⚠ (client, smithy-rs#2099) The Rust client codegen plugin is now called rust-client-codegen instead of rust-codegen. Be sure to update your smithy-build.json files to refer to the correct plugin name.
    • ⚠ (client, smithy-rs#2099) Client codegen plugins need to define a service named software.amazon.smithy.rust.codegen.client.smithy.customize.ClientCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).
    • ⚠ (server, smithy-rs#2099) Server codegen plugins need to define a service named software.amazon.smithy.rust.codegen.server.smithy.customize.ServerCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).

    New this release:

    • πŸ› (server, smithy-rs#2103) In 0.52, @length-constrained collection shapes whose members are not constrained made the server code generator crash. This has been fixed.
    • (server, smithy-rs#1879) Servers support the @default trait: models can specify default values. Default values will be automatically supplied when not manually set.
    • (server, smithy-rs#2131) The constraint @length on non-streaming blob shapes is supported.
    • πŸ› (client, smithy-rs#2150) Fix bug where string default values were not supported for endpoint parameters
    • πŸ› (all, smithy-rs#2170, aws-sdk-rust#706) Remove the webpki-roots feature from hyper-rustls
    • πŸ› (server, smithy-rs#2054) Servers can generate a unique request ID and use it in their handlers.

    December 12th, 2022

    Breaking Changes:

    • βš πŸŽ‰ (all, smithy-rs#1938, @​jjantdev) Upgrade Rust MSRV to 1.62.1

    • βš πŸŽ‰ (server, smithy-rs#1199, smithy-rs#1342, smithy-rs#1401, smithy-rs#1998, smithy-rs#2005, smithy-rs#2028, smithy-rs#2034, smithy-rs#2036) Constraint traits in server SDKs are beginning to be supported. The following are now supported:

      • The length trait on string shapes.
      • The length trait on map shapes.
      • The length trait on list shapes.
      • The range trait on byte shapes.
      • The range trait on short shapes.
      • The range trait on integer shapes.
      • The range trait on long shapes.
      • The pattern trait on string shapes.

      Upon receiving a request that violates the modeled constraints, the server SDK will reject it with a message indicating why.

      Unsupported (constraint trait, target shape) combinations will now fail at code generation time, whereas previously they were just ignored. This is a breaking change to raise awareness in service owners of their server SDKs behaving differently than what was modeled. To continue generating a server SDK with unsupported constraint traits, set codegenConfig.ignoreUnsupportedConstraints to true in your smithy-build.json.

    • βš πŸŽ‰ (server, smithy-rs#1342, smithy-rs#1119) Server SDKs now generate "constrained types" for constrained shapes. Constrained types are newtypes that encapsulate the modeled constraints. They constitute a widespread pattern to guarantee domain invariants and promote correctness in your business logic. So, for example, the model:

      @length(min: 1, max: 69)
      string NiceString
      

      will now render a struct NiceString(String). Instantiating a NiceString is a fallible operation:

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update aws-smithy-types requirement from 0.52.0 to 0.53.0

    Update aws-smithy-types requirement from 0.52.0 to 0.53.0

    Updates the requirements on aws-smithy-types to permit the latest version.

    Changelog

    Sourced from aws-smithy-types's changelog.

    January 11th, 2023

    Breaking Changes:

    • ⚠ (client, smithy-rs#2099) The Rust client codegen plugin is now called rust-client-codegen instead of rust-codegen. Be sure to update your smithy-build.json files to refer to the correct plugin name.
    • ⚠ (client, smithy-rs#2099) Client codegen plugins need to define a service named software.amazon.smithy.rust.codegen.client.smithy.customize.ClientCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).
    • ⚠ (server, smithy-rs#2099) Server codegen plugins need to define a service named software.amazon.smithy.rust.codegen.server.smithy.customize.ServerCodegenDecorator (this is the new file name for the plugin definition in resources/META-INF/services).

    New this release:

    • πŸ› (server, smithy-rs#2103) In 0.52, @length-constrained collection shapes whose members are not constrained made the server code generator crash. This has been fixed.
    • (server, smithy-rs#1879) Servers support the @default trait: models can specify default values. Default values will be automatically supplied when not manually set.
    • (server, smithy-rs#2131) The constraint @length on non-streaming blob shapes is supported.
    • πŸ› (client, smithy-rs#2150) Fix bug where string default values were not supported for endpoint parameters
    • πŸ› (all, smithy-rs#2170, aws-sdk-rust#706) Remove the webpki-roots feature from hyper-rustls
    • πŸ› (server, smithy-rs#2054) Servers can generate a unique request ID and use it in their handlers.

    December 12th, 2022

    Breaking Changes:

    • βš πŸŽ‰ (all, smithy-rs#1938, @​jjantdev) Upgrade Rust MSRV to 1.62.1

    • βš πŸŽ‰ (server, smithy-rs#1199, smithy-rs#1342, smithy-rs#1401, smithy-rs#1998, smithy-rs#2005, smithy-rs#2028, smithy-rs#2034, smithy-rs#2036) Constraint traits in server SDKs are beginning to be supported. The following are now supported:

      • The length trait on string shapes.
      • The length trait on map shapes.
      • The length trait on list shapes.
      • The range trait on byte shapes.
      • The range trait on short shapes.
      • The range trait on integer shapes.
      • The range trait on long shapes.
      • The pattern trait on string shapes.

      Upon receiving a request that violates the modeled constraints, the server SDK will reject it with a message indicating why.

      Unsupported (constraint trait, target shape) combinations will now fail at code generation time, whereas previously they were just ignored. This is a breaking change to raise awareness in service owners of their server SDKs behaving differently than what was modeled. To continue generating a server SDK with unsupported constraint traits, set codegenConfig.ignoreUnsupportedConstraints to true in your smithy-build.json.

    • βš πŸŽ‰ (server, smithy-rs#1342, smithy-rs#1119) Server SDKs now generate "constrained types" for constrained shapes. Constrained types are newtypes that encapsulate the modeled constraints. They constitute a widespread pattern to guarantee domain invariants and promote correctness in your business logic. So, for example, the model:

      @length(min: 1, max: 69)
      string NiceString
      

      will now render a struct NiceString(String). Instantiating a NiceString is a fallible operation:

      let data: String = ... ;
      let nice_string = NiceString::try_from(data).expect("data is not nice");
      

      A failed attempt to instantiate a constrained type will yield a ConstraintViolation error type you may want to handle. This type's API is subject to change.

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update aws-manager requirement from 0.21.13 to 0.22.10

    Update aws-manager requirement from 0.21.13 to 0.22.10

    Updates the requirements on aws-manager to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update aws-manager requirement from 0.21.13 to 0.22.9

    Update aws-manager requirement from 0.21.13 to 0.22.9

    Updates the requirements on aws-manager to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update random-manager requirement from 0.0.1 to 0.0.2

    Update random-manager requirement from 0.0.1 to 0.0.2

    Updates the requirements on random-manager to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Split into more crates

    Split into more crates

    Hello, I'm interested to use the primitives part of this SDK (transaction) - without the rest of the dependencies, is it possible to create more crate for each part of this project?

    enhancement 
    opened by Milerius 3
  • The crate doesn't build on Windows ARM64

    The crate doesn't build on Windows ARM64

    The build fails on Windows ARM64 because of ring package (possibly, it won't build on x86 either):

    error: failed to run custom build command for `ring v0.16.20`
    
      --- stdout
      OPT_LEVEL = Some("0")
      TARGET = Some("aarch64-pc-windows-msvc")
      HOST = Some("aarch64-pc-windows-msvc")
      cargo:rerun-if-env-changed=CC_aarch64-pc-windows-msvc
      CC_aarch64-pc-windows-msvc = None
      cargo:rerun-if-env-changed=CC_aarch64_pc_windows_msvc
      CC_aarch64_pc_windows_msvc = None
      cargo:rerun-if-env-changed=HOST_CC
      HOST_CC = None
      cargo:rerun-if-env-changed=CC
      CC = None
      cargo:rerun-if-env-changed=CFLAGS_aarch64-pc-windows-msvc
      CFLAGS_aarch64-pc-windows-msvc = None
      cargo:rerun-if-env-changed=CFLAGS_aarch64_pc_windows_msvc
      CFLAGS_aarch64_pc_windows_msvc = None
      cargo:rerun-if-env-changed=HOST_CFLAGS
      HOST_CFLAGS = None
      cargo:rerun-if-env-changed=CFLAGS
      CFLAGS = None
      cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
      CRATE_CC_NO_DEFAULTS = None
      CARGO_CFG_TARGET_FEATURE = Some("neon")
      DEBUG = Some("true")
      montgomery.c
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2065: 'BN_ULLONG': undeclared identifier
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2146: syntax error: missing ';' before identifier 'result'
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): warning C4555: result of expression not used
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2065: 'result': undeclared identifier
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2146: syntax error: missing ';' before identifier 'a'
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): warning C4552: '*': result of expression not used
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(192): error C2065: 'result': undeclared identifier
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(193): error C2065: 'result': undeclared identifier
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(193): warning C4293: '>>': shift count negative or too big, undefined behavior
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(38): warning C4163: '_addcarry_u64': not available as an intrinsic function
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(38): warning C4163: '_subborrow_u64': not available as an intrinsic function
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(62): warning C4013: '_addcarry_u64' undefined; assuming extern returning int
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(62): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(76): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(92): warning C4013: '_subborrow_u64' undefined; assuming extern returning int
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(92): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
      $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(106): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
    
    help wanted 
    opened by ssg 1
Owner
Ava Labs
Ava Labs
Rust based Virtual Machine on Avalanche that implements Bulletproof ZK Proofs.

BulletproofVM Rust based Virtual Machine on Avalanche that implements Bulletproof ZK Proofs. Zero-Knowledge Virtual Machine This is a virtual machine

null 14 Jan 4, 2023
Avalanche APIs/VM SDK in Rust

avalanche-rs ⚠️ avalanche-rs is alpha-level software and is not ready for production use. Do not use avalanche-rs to run production workloads. See the

Ava Labs 30 Oct 10, 2023
Cryptographic Primitive Code Generation by Fiat

Fiat-Crypto: Synthesizing Correct-by-Construction Code for Cryptographic Primitives Building This repository requires Coq 8.11 or later. Note that if

Programming Languages and Verification Group at MIT CSAIL 538 Jan 7, 2023
Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools.

yi Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools. About Yi is a Solana primitive for building single-sided

Crate Protocol 12 Apr 7, 2022
Lockstitch is an incremental, stateful cryptographic primitive for symmetric-key cryptographic operations in complex protocols.

Lockstitch is an incremental, stateful cryptographic primitive for symmetric-key cryptographic operations (e.g. hashing, encryption, message authentication codes, and authenticated encryption) in complex protocols.

Coda Hale 3 Dec 27, 2022
Simple shared types for multi-threaded Rust programs

Keep Calm (and call Clone) Simple shared types for multi-threaded Rust programs: keepcalm gives you permission to simplify your synchronization code i

Matt Mastracci 5 Mar 6, 2023
🐺 Starknet Rust types πŸ¦€

types-rs ?? Starknet Rust types ?? This repository is an initiative by a group of maintainers to address the fragmentation in the Starknet Rust ecosys

Starknet 22 Jun 2, 2023
A black-box raw calldata decoder using only calldata to guess types and parse parameters.

Calldata Decoder A black-box raw calldata decoder using only calldata. Based off the topics discussed in DeGatchi's article, Reverse The EVM: Raw Call

DeGatchi 78 Jan 24, 2023
An experimental rust zksnarks compiler with embeeded bellman-bn128 prover

Za! An experimental port of the circom zk-SNARK compiler in Rust with embedded bellman-bn128 prover. I created it as a PoC port of the existing JavaSc

adria0.eth 39 Aug 26, 2022
Rust implementation of the Matter protocol. Status: Experimental

matter-rs: The Rust Implementation of Matter Build Building the library: $ cd matter $ cargo build Building the example: $ cd matter $ RUST_LOG="matt

Connectivity Standards Alliance 12 Jan 5, 2023
CosmOS - experimental operating system written in Rust.

CosmOS A simple operating system written in Rust. Table of Contents CosmOS Setup QEMU Run OS dev resources General Bootloader Setup Linux Arch pacman

COSMO PK Group 11 Oct 7, 2023
EXPERIMENTAL: Bitcoin Core Prometheus exporter based on User-Space, Statically Defined Tracing and eBPF.

bitcoind-observer An experimental Prometheus metric exporter for Bitcoin Core based on Userspace, Statically Defined Tracing and eBPF. This demo is ba

0xB10C 24 Nov 8, 2022
Experimental binary transparency for pacman with sigstore and rekor

pacman-bintrans This is an experimental implementation of binary transparency for pacman, the Arch Linux package manager. This project was originally

null 80 Dec 23, 2022
Write Extism plugins in JavaScript (Experimental)

Extism JavaScript PDK Note: This is very experimental. If you are interested in helping or following development, join the #js-pdk room in our discord

Extism 6 Jan 18, 2023
An experimental fork of a16z's Helios Ethereum client which can run its network traffic over the Nym mixnet

Helios (Nym mixnet fork) Helios is a fully trustless, efficient, and portable Ethereum light client written in Rust. This fork of Helios includes nasc

Nym 4 Mar 3, 2023
Briolette is an experimental framework for researching offline digital currency designs.

Briolette - experimental framework for offline-enabled digital currency Briolette is an experimental framework for researching offline digital currenc

Google 39 Apr 9, 2023
experimental package manager for node.js

pacquet Experimental package manager for node.js written in rust. Disclaimer: This is mostly a playground for me to learn Rust and understand how pack

pnpm 349 Aug 22, 2023
Package used by the cosmos-rust-interface. Makes direct use of cosmos-rust.

Package used by the cosmos-rust-interface. Makes direct use of cosmos-rust (cosmos‑sdk‑proto, osmosis-proto, cosmrs).

Philipp 4 Dec 26, 2022
Rust project for working with ETH - Ethereum transactions with Rust on Ganache and also deploy smart contracts :)

Just a test project to work with Ethereum but using Rust. I'm using plain Rust here, not Foundry. In future we will use Foundry. Hope you're already f

Akhil Sharma 2 Dec 20, 2022