Understanding the delimitation of the concept "runtime" with regard to Tokio

⚓ rust    📅 2025-06-16    👤 surdeus    👁️ 2      

surdeus

Hello,

I am working through the Rust book https://doc.rust-lang.org/book/ch17-01-futures-and-syntax.html
and it says that Tokio is a runtime.

I always thought that the runtime or runtime system is the set of instructions that a compiler generates to execute the source code. This includes a garbage collection system, setting up and destroying stackframes and passing arguments for function calls. So by this definition Tokio is not a runtime. It is a library and when it gets compiled the compiler inserts instructions within the functions defined by tokio that are part of the runtime system. e.g. managing stackframes.

Is my understanding false? Thanks!

2 posts - 2 participants

Read full topic

🏷️ rust_feed