Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RustのWebフレームワーク周りの概観

hayao
July 20, 2022

 RustのWebフレームワーク周りの概観

FutureCon2022での登壇資料です。

RustのWebフレームワーク周りの代表的なソフトウェアスタックであるaxum、hyper、tokio、mio、towerについて簡単に説明しました。

hayao

July 20, 2022
Tweet

Other Decks in Programming

Transcript

  1. 本発表で参照するクレートの関係 axum hyper Service tokio mio use use web framework

    http server asynchronous runtime I/O library Routing ObjectをServiceに 変換してhyperに渡す 5
  2. tokio axum hyper Service tokio mio use use web framework

    http server asynchronous runtime I/O library Routing ObjectをServiceに 変換してhyperに渡す 7
  3. イメージ図 tokio runtime contextでspawnを呼べばtokioがtaskを良しなに実 行してくれる。 Thread Pool tokio runtime (multi

    thread scheduler) spawn Future tokio runtime context SpawnにFutureを渡すとtaskが生成される block_onを呼ぶことでruntimeを起動 11
  4. mio axum hyper Service tokio mio use use web framework

    http server asynchronous runtime I/O library Routing ObjectをServiceに 変換してhyperに渡す 15
  5. hyper axum hyper Service tokio mio use use web framework

    http server asynchronous runtime I/O library Routing ObjectをServiceに 変換してhyperに渡す 17
  6. axum axum hyper Service tokio mio use use web framework

    http server asynchronous runtime I/O library Routing ObjectをServiceに 変換してhyperに渡す 19
  7. tower axum hyper Service tokio mio use use web framework

    http server asynchronous runtime I/O library Routing ObjectをServiceに 変換してhyperに渡す 25