summaryrefslogtreecommitdiffstats
path: root/packages/svgbob/examples/circuits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/svgbob/examples/circuits.rs')
-rw-r--r--packages/svgbob/examples/circuits.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/svgbob/examples/circuits.rs b/packages/svgbob/examples/circuits.rs
new file mode 100644
index 0000000..c94fe60
--- /dev/null
+++ b/packages/svgbob/examples/circuits.rs
@@ -0,0 +1,12 @@
+use std::{fs, io, time::Instant};
+
+extern crate svgbob;
+
+fn main() -> io::Result<()> {
+ let art = include_str!("../test_data/circuits.bob");
+ let t1 = Instant::now();
+ fs::create_dir_all("out")?;
+ fs::write("out/circuits.svg", svgbob::to_svg(art))?;
+ println!("took {}ms", t1.elapsed().as_millis());
+ Ok(())
+}