Allow users to disable optional features. Needed for wasm32 support (see #615).

This commit is contained in:
Rujia Liu
2023-08-21 10:01:24 +08:00
parent 5aa1521819
commit 25d4950216
12 changed files with 292 additions and 28 deletions

View File

@@ -2,6 +2,7 @@ use crate::arena::*;
use crate::atom_table::*;
use crate::parser::ast::*;
#[cfg(feature = "ffi")]
use crate::ffi::FFIError;
use crate::forms::*;
use crate::machine::heap::*;
@@ -538,6 +539,7 @@ impl MachineState {
}
}
#[cfg(feature = "ffi")]
pub(super) fn ffi_error(&mut self, err: FFIError) -> MachineError {
let error_atom = match err {
FFIError::ValueCast => atom!("value_cast"),