[package]
edition = "2024"
rust-version = "1.85"
name = "csharp-rs"
version = "0.1.2"
authors = ["Clément Cornut <cornut.clem@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Generate C# type definitions from Rust structs and enums"
homepage = "https://github.com/Pulsar-Anvil-Studios/csharp-rs"
readme = "README.md"
keywords = [
"csharp",
"codegen",
"derive",
"serde",
"unity",
]
categories = [
"development-tools::ffi",
"development-tools::build-utils",
]
license = "MIT"
repository = "https://github.com/Pulsar-Anvil-Studios/csharp-rs"
resolver = "2"
[features]
chrono-impl = ["dep:chrono"]
serde-json-impl = ["dep:serde_json"]
uuid-impl = ["dep:uuid"]
[lib]
name = "csharp_rs"
path = "src/lib.rs"
[[test]]
name = "csharp_compilation"
path = "tests/csharp_compilation.rs"
[[test]]
name = "csharp_roundtrip"
path = "tests/csharp_roundtrip.rs"
[[test]]
name = "derive_enum"
path = "tests/derive_enum.rs"
[[test]]
name = "derive_generic"
path = "tests/derive_generic.rs"
[[test]]
name = "derive_struct"
path = "tests/derive_struct.rs"
[[test]]
name = "derive_tagged_enum"
path = "tests/derive_tagged_enum.rs"
[dependencies.chrono]
version = "0.4"
optional = true
default-features = false
[dependencies.csharp-rs-macros]
version = "=0.1.2"
[dependencies.serde_json]
version = "1"
optional = true
[dependencies.uuid]
version = "1"
optional = true
default-features = false
[dev-dependencies.serde]
version = "1.0.228"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1.0.149"
[lints.clippy]
allow_attributes_without_reason = "warn"
clone_on_ref_ptr = "warn"
deref_by_slicing = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
if_then_some_else_none = "warn"
literal_string_with_formatting_args = "allow"
map_err_ignore = "warn"
multiple_crate_versions = "allow"
redundant_type_annotations = "warn"
semicolon_outside_block = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unneeded_field_pattern = "warn"
unused_result_ok = "warn"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.complexity]
level = "warn"
priority = -1
[lints.clippy.correctness]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.clippy.perf]
level = "warn"
priority = -1
[lints.clippy.style]
level = "warn"
priority = -1
[lints.clippy.suspicious]
level = "warn"
priority = -1
[lints.rust]
ambiguous_negative_literals = "warn"
missing_debug_implementations = "warn"
redundant_imports = "warn"
redundant_lifetimes = "warn"
trivial_numeric_casts = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_lifetimes = "warn"