Cargo Features

[dependencies]
wrapped_mono = { version = "0.3.1", default-features = false, features = ["unsafe_boxing", "unsafe_arrays", "unsafe_speedup", "build_test_dlls", "regen_binds", "dump_macro_results", "referneced_objects", "old_gc_unsafe", "profiler_api"] }
default = referneced_objects

The referneced_objects feature is set by default whenever wrapped_mono is added without default-features = false somewhere in the dependency tree.

unsafe_boxing unsafe_speedup?

Disables boxing/unboxing safety checks. Normally, when an object is unboxed, it's type is checked to prevent crashes and errors. Enabling unsafe_unboxing will make wrapped_mono assume that type given by the user is always correct.

unsafe_arrays unsafe_speedup?

Disables array safety checks. Normally, when an array is created, it will make checks to ensure that its managed type matches its unmanaged type.

unsafe_speedup = unsafe_arrays, unsafe_boxing

Disables all safety checks to slightly speed wrapped_mono up. Gains are usually negligible and potential errors will have more cryptic messages(Segfaluts instead of failed assertions). USE WITH CAUTION.

build_test_dlls

Build test dlls. Enable only for tests, if you want to change test .cs files.

regen_binds = bindgen

Regenerates bindings for mono library

dump_macro_results

Dumps code created as results of macros into "macro.dump" file. Use for debugging when macros do not behave as expected.

Enables dump_macro_results of wrapped_mono_macros

Macros used by wrapped_mono

referneced_objects default

Prevents objects in use by rust from being removed by mono runtime, adds slight overhead but is essential for storing objects long term. Can be disabled, but disabling it forces manual management of object lifetimes using GC handles.

old_gc_unsafe

Uses some old variants of mono API. Try if mono_threads_enter_gc_unsafe_region symbol is missing during linking.

profiler_api

Affects wrapped_mono::profiler

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

bindgen build regen_binds?

Enables bindgen ^0.60.1