1#![recursion_limit = "4112"]
2
3#[macro_use]
4extern crate static_assertions;
5#[cfg(test)]
6#[macro_use]
7extern crate maplit;
8
9#[macro_use]
10pub mod macros;
11#[macro_use]
12pub mod atom_table;
13#[macro_use]
14pub mod arena;
15#[macro_use]
16pub mod parser;
17mod allocator;
18mod arithmetic;
19pub mod codegen;
20mod debray_allocator;
21#[cfg(feature = "ffi")]
22mod ffi;
23mod forms;
24mod heap_iter;
25pub mod heap_print;
26#[cfg(feature = "http")]
27mod http;
28mod indexing;
29mod variable_records;
30#[macro_use]
31pub mod instructions {
32 include!(concat!(env!("OUT_DIR"), "/instructions.rs"));
33}
34mod iterators;
35pub mod machine;
36mod raw_block;
37pub mod read;
38#[cfg(feature = "repl")]
39mod repl_helper;
40mod targets;
41pub mod types;
42
43use instructions::instr;
44
45mod rcu;
46
47#[cfg(target_arch = "wasm32")]
48use wasm_bindgen::prelude::*;
49
50#[cfg(target_arch = "wasm32")]
51#[wasm_bindgen]
52pub fn eval_code(s: &str) -> String {
53 use machine::mock_wam::*;
54
55 console_error_panic_hook::set_once();
56
57 let mut wam = Machine::with_test_streams();
58 let bytes = wam.test_load_string(s);
59 String::from_utf8_lossy(&bytes).to_string()
60}