1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#[macro_use]
extern crate lazy_static;
#[cfg(all(unix, not(target_os = "freebsd")))]
#[macro_use]
extern crate sig;
#[macro_use]
mod errors;
mod cargo_metadata;
mod child_process;
mod code_block;
mod command_context;
mod crate_config;
mod eval_context;
#[allow(dead_code)]
mod evcxr_internal_runtime;
mod item;
mod module;
mod runtime;
mod statement_splitter;
pub use crate::command_context::CommandContext;
pub use crate::errors::{CompilationError, Error};
pub use crate::eval_context::{EvalContext, EvalContextOutputs, EvalOutputs};
pub use crate::runtime::runtime_hook;
pub fn config_dir() -> Option<std::path::PathBuf> {
std::env::var_os("EVCXR_CONFIG_DIR")
.map(std::path::PathBuf::from)
.or_else(|| dirs::config_dir().map(|d| d.join("evcxr")))
}