Introduction
In this lab, you will learn about the Rust Playground, a web interface that allows you to experiment with Rust code. You will also discover how to use it with mdbook
to make code examples playable and editable. Additionally, you will explore how to use it with docs and enable the "Run" button by using the html_playground_url
attribute in Rust code.
Note: If the lab does not specify a file name, you can use any file name you want. For example, you can use
main.rs
, compile and run it withrustc main.rs && ./main
.