この記事はRust Advent Calendar 2021 21日目の記事です。 tokio-console この記事では3日ほど前(2021-12-17)にリリースされたtokio-consoleというコマンドツールの使い方とtokioタスクの説明をします。tokio自体はなんとなく理解しているという想定で説明します。 実行イメージ topコマンドのようにtokioのタスクを一覧表示するコマンドラインツールです。ターゲットのプログラムに少しだけ小細工が必要になります。 Tokio Console is a diagnostics and debugging tool for asynchronous Rust programs. It gives you a live, easy-to-navigate view into the program's tasks and resourc
![tokio-console: topみたいなRustのコマンドラインツール](https://cdn-ak-scissors.b.st-hatena.com/image/square/2e979bfbdc797850288f9c708f1ae1ec86bd2dd1/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--_b6dEUs3--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_55%3Atokio-console%25253A%252520top%2525E3%252581%2525BF%2525E3%252581%25259F%2525E3%252581%252584%2525E3%252581%2525AARust%2525E3%252581%2525AE%2525E3%252582%2525B3%2525E3%252583%25259E%2525E3%252583%2525B3%2525E3%252583%252589%2525E3%252583%2525A9%2525E3%252582%2525A4%2525E3%252583%2525B3%2525E3%252583%252584%2525E3%252583%2525BC%2525E3%252583%2525AB%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3ATF%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2k1QWNYclM5WEJFMTZpc0hiNnN6ODFrbWdRZ09ST3lySTJaZ2c0PXMyNTAtYw%3D%3D%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)