Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !6244

[Rust Server] Hyper 0.13 + Async/Await support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/Metaswitch/rust-server-hyper-0.13 into master May 10, 2020
  • Overview 0
  • Commits 5
  • Pipelines 0
  • Changes 69

Created by: richardwhiuk

  • Updated dependencies:
    • hyper 0.13 (from 0.12)
    • hyper-openssl 0.8 (from 0.7)
    • futures 0.3 (from 0.1)
    • swagger-rs 5 (from 4)
    • uuid 0.8 (from 0.7)
    • serde_ignored 0.1 (from 0.0.4)
    • url 2.1 (new)
    • serde_urlencoded 0.6 (from 0.5)
    • percent-encoding 2 (from 1)
    • regex 1 (from 0.2)
    • frunk-enum-derive 0.2 (from 0.1 internal)
    • frunk-enum-core 0.2 (from 0.1 internal)
  • Updated dev dependencies
    • error_chain removed
    • tokio 0.2 (from 0.1)
    • native-tls 0.2 (from 0.1)
    • tokio-tls 0.3 (from 0.1)
    • tokio-openssl 0.4 (from 0.3)
  • API changes
    • Addition of poll_ready to expose API busy-ness - this is optional.
    • Trait is now tagged with async_trait, and all methods are async.
  • Deprecation removals
    • No longer export swagger::ApiError, or futures::Future
  • Client changes:
    • Now parameterised by enclosing Service, rather than by the future it produces
    • ⚠ Service must be Clone and Send and Sync.
  • Server Changes:
    • ⚠ Context is now required to be Clone and Send and Sync.
    • MakeService and Service are now a tower::Services.
  • Middleware changes
    • MakeAddContext/AddContext now impl tower::Service
  • Server and Client are implemented using async/await.
    • Note, for Server, this is done by mirroring how async_trait works
    • Sadly tower::Service doesn't use async_trait, so this doesn't just fall out.
    • For client, both URL construction and Multipart construction is forced into a block to workaround limitations in Rust's escape analysis for futures.

This resolves https://github.com/OpenAPITools/openapi-generator/issues/3865

Rust Server Technical Committee

  • @frol
  • @farcaller
  • @bjgill
  • @paladinzh

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Metaswitch/rust-server-hyper-0.13