-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCargo.toml
50 lines (48 loc) · 3.07 KB
/
Cargo.toml
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
[package]
name = "wrapped_mono"
version = "0.4.0"
edition = "2021"
links = "mono-2.0"
license = "MIT"
description = "`wrapped_mono` is a safe, lightweight wrapper around the mono library. It allows embedding of the mono runtime inside a rust project. Inside this embedded runtime code written in languages supporting the .NET framework, such as C# and F#, can be run. This allows usage of libraries written in those languages, and using them as a scripting language. The mono runtime is used by many game engines, and this wrapper allows using it with projects written in Rust too."
repository = "https://github.com/FractalFir/wrapped_mono"
readme = "README.md"
keywords = ["DotNet","mono","CSharp","FSharp","framework"]
categories = ["api-bindings","memory-management"]
authors = ["FractalFir <[email protected]>"]
exclude = ["src/wrapped_mono_macros","test"]
[build-dependencies]
bindgen = {version = "0.60.1",optional = true}
[dependencies]
document-features = "0.2.3" # Used for documenting features of this crate
lazy_static = "1.4.0" # Used for certain class types
wrapped_mono_macros = {path = "./src/wrapped_mono_macros"} # Macros used by wrapped_mono
[dev-dependencies]
rusty-fork = "0.3.0"
bencher = "0.1.5"
[workspace]
members = ["src/wrapped_mono_macros"]
[features]
default = ["referenced_objects"]
## 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_boxing = []
## 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_arrays = []
## 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.
unsafe_speedup = ["unsafe_boxing","unsafe_arrays"]
## Build test dlls. Enable only for tests, if you want to change test .cs files.
build_test_dlls = []
## Regenerates bindings for mono library
regen_binds = ["bindgen"]
## Dumps code created as results of macros into "macro.dump" file. Use for debugging when macros do not behave as expected.
dump_macro_results = ["wrapped_mono_macros/dump_macro_results"]
## 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.
referenced_objects = []
## Uses some old variants of mono API. Try if `mono_threads_enter_gc_unsafe_region` symbol is missing during linking.
old_gc_unsafe = []
profiler_api= []
# Allows a different Mono dynamic library to be linked, in case the library differs (e.g. in some Unity builds)
# As this is highly unsafe (the user needs to verify himself if the alternative library is ABI/API-compatible)
# this feature should be used with caution. The only use case for this is for debugging other applications in my
# knowledge.
mono_lib_fom_env = []