[package]
name = "geyserlite"
version = "0.3.18"
edition = "2024"
rust-version = "1.88"
description = "Embed GeyserMC's Bedrock-Java translation in Rust programs (in-process via libloading, or as a managed subprocess)"
license = "MIT"
repository = "https://github.com/minekube/geyserlite"
homepage = "https://github.com/minekube/geyserlite"
keywords = ["minecraft", "bedrock", "geyser", "minekube", "graalvm"]
categories = ["network-programming", "external-ffi-bindings"]
readme = "README.md"

[features]
default = []

# Embed libgeyserlite.so via include_bytes! and self-extract on first start.
embed = ["dep:sha2"]

# Auto-download libgeyserlite.so from GitHub Release with checksum verification.
download = ["dep:reqwest", "dep:sha2"]

[dependencies]
tokio = { version = "1", features = ["macros", "process", "signal", "rt-multi-thread", "io-util", "time", "sync"] }
tokio-util = "0.7"
tracing = "0.1"
libloading = "0.9"
thiserror = "2"
getrandom = "0.4"
tempfile = "3"
libc = "0.2"

# embed + download features
sha2 = { version = "0.11", optional = true }
# download feature
reqwest = { version = "0.13", features = ["rustls"], default-features = false, optional = true }
serde_yaml_ng = "0.10"

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
tracing-subscriber = "0.3"
anyhow = "1"
base64 = "0.22"

[[example]]
name = "basic"
path = "examples/basic.rs"

[[example]]
name = "floodgate"
path = "examples/floodgate.rs"

[[example]]
name = "fly"
path = "examples/fly.rs"

[[example]]
name = "healthcheck"
path = "examples/healthcheck.rs"

[[example]]
name = "custom_config"
path = "examples/custom_config.rs"

[[example]]
name = "integration_test"
path = "examples/integration_test.rs"
