Skip to content

Instantly share code, notes, and snippets.

View cyqsimon's full-sized avatar
💭
👨‍🚀

cyqsimon

💭
👨‍🚀
  • Geosynchronous Orbit
View GitHub Profile
@cyqsimon
cyqsimon / build.rs
Last active August 8, 2024 04:28
Cargo build script to test all Rust code snippets in your README.md file
fn main() {
extract_readme_example();
}
fn extract_readme_example() {
use std::{env, fmt::Write, fs, path::Path};
println!("cargo:rerun-if-changed=README.md");
// load README