rust_pixel 2.0.0

2d pixel-art game engine & rapid prototype tools support terminal, wgpu, sdl2 and web...
Documentation
[package]
name = "rust_pixel"
version = "2.0.0"
edition = "2021"
authors = ["zipxing@hotmail.com"]
repository = "https://github.com/zipxing/rust_pixel"
readme = "README.md"
license = "Apache-2.0"
description = "2d pixel-art game engine & rapid prototype tools support terminal, wgpu, sdl2 and web..."
categories = ["game-engines", "gui", "graphics"]
exclude = ["/screen-shot", "/doc", "/test", "/assets", "/web-template"]

# Define binaries that will be built for the project.
[[bin]]
name = "cargo-pixel"
path = "tools/cargo-pixel/src/main.rs"

[workspace.dependencies]
cfg_aliases = "0.2.1"

[build-dependencies]
cfg_aliases = { workspace = true }

[dependencies]
cfg_aliases = { workspace = true }
# Procedural macro dependencies
quote = "1.0"
syn = { version = "2.0", features = ["full"] }
proc-macro2 = "1.0"
paste = "1.0"

bincode = { version = "2.0.1", features = ["serde"] }
bitflags = { version = "2.9", features = ["serde"] }
crossterm = { version = "0.29", optional = true }
dirs-next = "2.0.0"
flate2 = "1.1.2"
itertools = "0.14.0"
lazy_static = "1.5.0"
log = "0.4.28"
log4rs = { version = "1.4.0", optional = true }
num-traits = "0.2"
num-derive = "0.4"
regex = "1.11.2"
rand = "0.9.2"
rand_xoshiro = "0.7.0"
keyframe = "=1.1.1"
keyframe_derive = "1.0.0"
serde = { version = "1.0.226", features = ["derive"] }
sdl2 = { version = "0.38.0", optional = true, features = ["image", "gfx", "unsafe_textures"] }
winit = { version = "0.30", optional = true }
glutin = { version = "0.32.3", optional = true }
glutin-winit = { version = "0.5", optional = true }
raw-window-handle = { version = "0.6", optional = true }
image = { version = "0.25.8", optional = true }
glow = { version = "0.16.0" }
# wgpu dependencies for modern GPU rendering
wgpu = { version = "26.0", optional = true }
bytemuck = { version = "1.23", features = ["derive"], optional = true }
pollster = { version = "0.4", optional = true }
unicode-segmentation = "1.12"
unicode-width = "0.2"
clap = { version = "4.5", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
toml = "0.8"
lab = "0.11.0"
deltae = "0.3.2"

# wgpu dependencies removed

[target.'cfg(not(any(target_os = "android", target_os = "ios", target_arch = "wasm32")))'.dependencies]
rodio = { version = "0.21.1", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = { version = "0.1.7", optional = true }
getrandom = { version = "0.3", features = ["wasm_js"] }
js-sys = "0.3.80"
wasm-bindgen = "0.2.105"
wasm-logger = "0.2.0"

[dependencies.web-sys]
version = "0.3.80"
features = [
  "CanvasRenderingContext2d",
  "CssStyleDeclaration",
  "Document",
  "Element",
  "EventTarget",
  "HtmlCanvasElement",
  "HtmlElement",
  "KeyboardEvent",
  "MouseEvent",
  "Node",
  "Window",
  "WebGlBuffer",
  "WebGl2RenderingContext",
  "WebGlProgram",
  "WebGlShader",
  "WebGlUniformLocation",
  "console",
  "Event",
  "MouseEventInit"
]

[features]
default = ["log4rs", "crossterm", "rodio", "image"]
web = ["image"]
term = ["log4rs", "crossterm", "rodio", "image"]
sdl = ["log4rs", "rodio", "sdl2", "image"]
glow = ["log4rs", "rodio", "dep:winit", "dep:glutin", "dep:glutin-winit", "dep:raw-window-handle", "image"]
wgpu = ["log4rs", "rodio", "dep:wgpu", "dep:bytemuck", "dep:pollster", "dep:winit", "dep:glutin", "dep:glutin-winit", "dep:raw-window-handle", "image"]
base = ["log4rs"]

[profile.release]
opt-level = 's'

[workspace]
members = [
    "apps/*",
    "tools/*",
    "pixel_basic",
]

exclude = [
    "tools/cargo-pixel",
    "tools/symbols",
    "apps/poker/ffi",
    "apps/poker/wasm",
    "apps/template/ffi",
    "apps/template/wasm",
    "apps/palette/ffi",
    "apps/palette/wasm",
    "apps/petview/ffi",
    "apps/petview/wasm",
]

[workspace.package]
authors = ["zipxing@hotmail.com"]
description = "2d pixel art game engine support terminal, wgpu, sdl2, and wasm..."