Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
use std::io::prelude::*;
fn main() {
let mut file = std::fs::File::create(r#"C:\git\check_all.cmd"#).unwrap();
let reader = reader::TypeReader::get_mut();
let root = reader.types.get_namespace("Windows").unwrap();
write_features(&mut file, root.namespace, root)
fn write_features(file: &mut std::fs::File, root: &'static str, tree: &reader::TypeTree) {
for tree in tree.namespaces.values() {
write_feature(file, root, tree);
write_features(file, root, tree);
fn write_feature(file: &mut std::fs::File, root: &'static str, tree: &reader::TypeTree) {
let feature = tree.namespace[root.len() + 1..].replace('.', "_");
file.write_all(format!("cargo clean\ncargo check --features {}\n", feature).as_bytes())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment