knave 0.14.21

A Lisp programming language for humans and agents that infers types and ownership and compiles to readable Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::env;
use std::fs;
use std::path::PathBuf;

use knave_expand::expand::PreludeState;

fn main() {
    let output = PathBuf::from(env::var_os("OUT_DIR").expect("cargo sets OUT_DIR"));
    let state = output.join("prelude-state.bin");
    fs::write(&state, PreludeState::build().save()).expect("OUT_DIR takes the prelude state");
    println!("cargo::rustc-env=PRELUDE_STATE={}", state.display());
    println!("cargo::rerun-if-changed=build.rs");
}