1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 06:20:32 +02:00
comprehensive-rust/exerciser/README.md

20 lines
497 B
Markdown
Raw Normal View History

2023-04-03 15:39:17 +02:00
# exerciser
This is a tool to generate templates for exercises from the Markdown source. Given a Markdown file
with one or more sections like:
````markdown
<!-- File src/main.rs -->
```rust,compile_fail
{{#include example/src/main.rs:main}}
fn some_more_code() {
// TODO: Write some Rust code here.
}
```
````
You can run it like `cargo run my/markdown/file.md exercise-templates/example`, and it will create a
file `exercise-templates/example/src/main.rs` with the appropriate contents.