Skip to content

Commit

Permalink
Merge pull request #100 from fmckeogh/master
Browse files Browse the repository at this point in the history
Feature gate panic hook
  • Loading branch information
zshipko committed Oct 15, 2022
2 parents 2c36406 + 0d84408 commit f0dc229
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ without-ocamlopt = [
"ocaml-boxroot-sys/without-ocamlopt"
]
caml-state = ["ocaml-sys/caml-state"]
no-std = ["cstr_core/alloc"]
no-std = ["cstr_core/alloc", "no-panic-hook"]
bigarray-ext = ["ndarray"]
no-caml-startup = ["ocaml-interop/no-caml-startup"]
no-panic-hook = []

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn initial_setup() {
ocaml_boxroot_sys::boxroot_setup();
}

#[cfg(not(feature = "no-std"))]
#[cfg(not(feature = "no-panic-hook"))]
{
::std::panic::set_hook(Box::new(|info| unsafe {
let err = info.payload();
Expand Down

0 comments on commit f0dc229

Please sign in to comment.