knave 0.9.8

A small Lisp 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
14
15
16
17
18
use std::process::ExitCode;

use knave::cli::Cli;
use knave::counters::CountingAllocator;

#[cfg(feature = "counters")]
#[global_allocator]
static ALLOCATOR: CountingAllocator = CountingAllocator::new();

#[cfg(feature = "counters")]
const COUNTED_ALLOCATOR: Option<&CountingAllocator> = Some(&ALLOCATOR);

#[cfg(not(feature = "counters"))]
const COUNTED_ALLOCATOR: Option<&CountingAllocator> = None;

fn main() -> ExitCode {
    Cli::parse_arguments().run(COUNTED_ALLOCATOR)
}