# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "syslog-rs"
version = "6.5.1"
authors = ["Aleksandr Morozov <alex@nixd.org>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A native Rust implementation of the glibc/libc/windows syslog client and windows native log for logging."
readme = "README.md"
keywords = [
    "syslog",
    "logging",
    "logs",
    "rsyslog",
    "eventlog",
]
categories = [
    "asynchronous",
    "os",
]
license = "MIT OR MPL-2.0 OR EUPL-1.2"
repository = "https://codeberg.org/4neko/syslog-rs"

[package.metadata.docs.rs]
features = [
    "build_sync",
    "truncate_default",
    "build_with_thread_local",
    "build_async_tokio",
    "build_with_queue",
    "build_ext_net",
    "build_ext_tls",
    "build_ext_file",
]
no-default-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
async_embedded = ["async_enabled"]
async_enabled = []
build_async_interface = ["async_enabled"]
build_async_smol = [
    "async_embedded",
    "dep:smol",
    "dep:futures-rustls",
]
build_async_tokio = [
    "async_embedded",
    "dep:tokio",
    "dep:tokio-rustls",
]
build_ext_file = []
build_ext_net = []
build_ext_tls = [
    "build_ext_net",
    "dep:rustls",
]
build_sync = ["dep:crossbeam-utils"]
build_with_queue = [
    "build_sync",
    "dep:crossbeam-channel",
]
build_with_thread_local = ["build_sync"]
default = [
    "build_sync",
    "truncate_default",
]
dgram_sysctl_failure_panic = []
example_tokio_en = ["dep:tokio"]
tcp_truncate_1024_bytes = []
tcp_truncate_2048_bytes = []
tcp_truncate_4096_bytes = []
tcp_truncate_max_bytes = []
truncate_default = [
    "udp_truncate_1440_bytes",
    "tcp_truncate_2048_bytes",
]
udp_truncate_1024_bytes = []
udp_truncate_1440_bytes = []

[lib]
name = "syslog_rs"
path = "src/lib.rs"

[[example]]
name = "example_async"
path = "examples/example_async.rs"
required-features = ["build_async_tokio"]

[[example]]
name = "example_custom_formatter"
path = "examples/example_custom_formatter.rs"
required-features = ["build_ext_file"]

[[example]]
name = "example_formatter"
path = "examples/example_formatter.rs"
required-features = ["build_sync"]

[[example]]
name = "example_inteface"
path = "examples/example_inteface.rs"
required-features = [
    "build_async_interface",
    "example_tokio_en",
]

[[example]]
name = "example_logto_file_async"
path = "examples/example_logto_file_async.rs"
required-features = [
    "build_async_tokio",
    "build_ext_file",
]

[[example]]
name = "example_logto_file_sync"
path = "examples/example_logto_file_sync.rs"
required-features = ["build_ext_file"]

[[example]]
name = "example_logtofile"
path = "examples/example_logtofile.rs"
required-features = [
    "build_async_tokio",
    "build_ext_file",
    "build_with_queue",
]

[[example]]
name = "example_smol_async"
path = "examples/example_smol_async.rs"
required-features = ["build_async_smol"]

[[example]]
name = "example_sync"
path = "examples/example_sync.rs"
required-features = ["build_sync"]

[[example]]
name = "example_sync_heavy_load"
path = "examples/example_sync_heavy_load.rs"
required-features = ["build_sync"]

[[example]]
name = "example_sync_queue"
path = "examples/example_sync_queue.rs"
required-features = ["build_with_queue"]

[[example]]
name = "example_sync_stream"
path = "examples/example_sync_stream.rs"
required-features = ["build_sync"]

[[example]]
name = "example_thread_local"
path = "examples/example_thread_local.rs"
required-features = ["build_with_thread_local"]

[[example]]
name = "example_tls"
path = "examples/example_tls.rs"
required-features = ["build_ext_tls"]

[[example]]
name = "example_udp"
path = "examples/example_udp.rs"
required-features = ["build_ext_net"]

[dependencies.bitflags]
version = "~2"

[dependencies.chrono]
version = "~0.4"

[dependencies.crossbeam-channel]
version = "~0.5"
optional = true

[dependencies.crossbeam-utils]
version = "~0.8"
optional = true

[dependencies.futures-rustls]
version = "~0.26"
optional = true

[dependencies.instance-copy-on-write]
version = "~0.7"

[dependencies.rustls]
version = "~0.23"
optional = true

[dependencies.smol]
version = "~2.0"
optional = true

[dependencies.socket2]
version = "~0.6"

[dependencies.tokio]
version = "~1"
features = [
    "rt-multi-thread",
    "net",
    "macros",
    "time",
    "sync",
    "io-util",
    "io-std",
    "fs",
]
optional = true

[dependencies.tokio-rustls]
version = "~0.26"
optional = true

[dev-dependencies.tokio-test]
version = "0.4"

[target."cfg(unix)".dependencies.nix]
version = "~0.30"
features = ["hostname"]

[target."cfg(windows)".dependencies.windows]
version = "~0.62"
features = [
    "Win32_System_EventLog",
    "Win32_Security",
    "Win32_System_Diagnostics_Etw",
    "Win32_System_SystemInformation",
    "Win32_Networking_WinSock",
]

[profile.dev]
opt-level = 0
