flowstdlib 0.3.0

The standard library for 'flow' programs compiled with the 'flowc' compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::env;
use std::fs::File;
use std::io::Write;
use std::path::Path;

fn main() {
    let out_dir = env::var("OUT_DIR").unwrap();
    let dest_path = Path::new(&out_dir).join("manifest.rs");
    let mut f = File::create(&dest_path).unwrap();

    f.write_all(b"
        pub fn message() -> &'static str {
            \"Hello, World!\"
        }
    ").unwrap();
}