[package]
name = "osynic_osuapi"
version = "0.1.11"
edition = "2024"
authors = ["Hako Chest <zoneherobrine@gmail.com>"]
rust-version = "1.85.0"
description = "High performance, well-structured, extensible Rust osu! API client. Supports both WASM and native environments."
keywords = ["osynic", "osu", "osuapi", "wasm"]
categories = ["games", "api-bindings"]
license = "MIT"
homepage = "https://osynic-osuapi.deno.dev"
documentation = "https://docs.rs/osynic_osuapi"
repository = "https://github.com/osynicite/osynic_osuapi"

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.149" }
chrono = { version = "0.4.44", features = ["serde"] }

tokio = { version = "1.51.1", features = [
    "rt-multi-thread",
    "macros",
    "sync",
    "fs",
], optional = true }
reqwest = { version = "0.13.2", default-features = false, features = [
    "rustls",
    "json",
    "query",
    "form"
], optional = true }

# WASM dependencies
tsify = { version = "0.5.6", optional = true }
gloo-net = { version = "0.7.0", optional = true }
serde_urlencoded = { version = "0.7.1", optional = true }
serde-wasm-bindgen = { version = "0.6.5", optional = true }
wasm-bindgen-futures = { version = "0.4.67", optional = true }
wasm-bindgen = { version = "0.2.117", optional = true }
urlencoding = { version = "2.1.3", optional = true }
web-sys = { version = "0.3.94", features = [
    "RequestInit",
    "Headers",
    "console",
    "Window",
    "Performance",
], optional = true }
js-sys = { version = "0.3.94", optional = true }
console_error_panic_hook = { version = "0.1.7", optional = true }
bitflags = { version = "2.11.0", optional = true }

[dev-dependencies]
dotenvy = "0.15.7"

[features]
default = ["v1", "v2", "not-wasm"]
v1 = ["bitflags"]
v2 = []
wasm = [
    "gloo-net",
    "web-sys",
    "js-sys",
    "serde-wasm-bindgen",
    "serde_urlencoded",
    "wasm-bindgen-futures",
    "wasm-bindgen",
    "urlencoding",
    "console_error_panic_hook"
]
not-wasm = ["tokio", "reqwest"]
export = ["tsify"]
