# 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 = "neser"
version = "1.1.0"
build = "build.rs"
exclude = [
    "roms/",
    "docs/",
    ".github/",
    ".githooks/",
    ".vscode/",
    "target/",
    "dist/",
    "node_modules/",
    "pkg/",
    "test-results/",
    "vendor/",
    "package.json",
    "package-lock.json",
    "playwright.config.ts",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "NESER - Nintendo Emulation Systems Engine (Rust). Desktop and WebAssembly frontends."
readme = "README.md"
license = "MIT"
repository = "https://github.com/rmstdope/neser"

[features]
default = ["native"]
frontend = []
native = [
    "frontend",
    "dep:winit",
    "dep:glutin",
    "dep:glutin-winit",
    "dep:raw-window-handle",
    "dep:gl",
    "dep:glow",
    "dep:librashader",
    "dep:cpal",
    "dep:gilrs",
    "dep:nosleep",
    "dep:rusqlite",
    "dep:strsim",
    "dep:reqwest",
    "dep:image",
    "dep:egui",
    "dep:egui-winit",
    "dep:egui_glow",
]
tui = [
    "dep:ratatui",
    "dep:crossterm",
]
wasm = [
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:console_error_panic_hook",
    "dep:js-sys",
    "dep:web-sys",
    "dep:wasm-bindgen-test",
]

[lib]
name = "neser"
crate-type = [
    "rlib",
    "cdylib",
]
path = "src/lib.rs"
doctest = false

[[bin]]
name = "frame_bench"
path = "src/bin/frame_bench.rs"
required-features = ["native"]

[[bin]]
name = "gamepad_test"
path = "src/bin/gamepad_test.rs"
required-features = ["native"]

[[bin]]
name = "neser"
path = "src/main.rs"
required-features = ["frontend"]

[[bin]]
name = "roms"
path = "src/bin/roms.rs"

[dependencies.bitflags]
version = "2.9"

[dependencies.console_error_panic_hook]
version = "0.1"
optional = true

[dependencies.cpal]
version = "0.15"
optional = true

[dependencies.crc]
version = "3.3"

[dependencies.crossterm]
version = "0.28"
optional = true

[dependencies.egui]
version = "0.34.2"
features = ["default_fonts"]
optional = true
default-features = false

[dependencies.egui-winit]
version = "0.34.2"
optional = true
default-features = false

[dependencies.egui_glow]
version = "0.34.2"
features = ["winit"]
optional = true

[dependencies.gilrs]
version = "0.11"
optional = true

[dependencies.gl]
version = "0.14"
optional = true

[dependencies.glow]
version = "0.14"
optional = true

[dependencies.glutin]
version = "0.32"
features = [
    "egl",
    "glx",
    "x11",
    "wayland",
    "wgl",
]
optional = true
default-features = false

[dependencies.glutin-winit]
version = "0.5"
features = [
    "egl",
    "glx",
    "x11",
    "wayland",
    "wgl",
]
optional = true
default-features = false

[dependencies.image]
version = "0.25"
features = [
    "jpeg",
    "png",
]
optional = true
default-features = false

[dependencies.js-sys]
version = "0.3"
optional = true

[dependencies.librashader]
version = "0.5"
features = [
    "runtime-gl",
    "presets",
    "stable",
]
optional = true
default-features = false

[dependencies.nosleep]
version = "0.2.1"
optional = true

[dependencies.num_enum]
version = "0.7"

[dependencies.png]
version = "0.17"

[dependencies.postcard]
version = "1"
features = ["alloc"]

[dependencies.rand]
version = "0.9.2"

[dependencies.ratatui]
version = "0.29"
optional = true

[dependencies.raw-window-handle]
version = "0.6"
optional = true

[dependencies.reqwest]
version = "0.12"
features = [
    "blocking",
    "rustls-tls",
]
optional = true
default-features = false

[dependencies.ringbuf]
version = "0.4"

[dependencies.rusqlite]
version = "0.36"
features = ["bundled"]
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.serde_with]
version = "3.18.0"

[dependencies.strsim]
version = "0.11"
optional = true

[dependencies.wasm-bindgen]
version = "0.2.108"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4.45"
optional = true

[dependencies.wasm-bindgen-test]
version = "0.3.45"
optional = true

[dependencies.web-sys]
version = "0.3"
features = [
    "Window",
    "console",
]
optional = true

[dependencies.winit]
version = "0.30"
optional = true

[dev-dependencies.hound]
version = "3.5"

[dev-dependencies.serial_test]
version = "3.2"

[dev-dependencies.tempfile]
version = "3.24.0"

[dev-dependencies.zip]
version = "2"
features = ["deflate"]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.3"
features = ["wasm_js"]

[profile.dev]
opt-level = 1

[profile.dev.package."*"]
opt-level = 3
incremental = false

[profile.release]
incremental = false

[profile.wasm-release]
opt-level = 3
lto = true
codegen-units = 1
inherits = "release"
