gmod-rs/crates/client/Cargo.toml
Niko Marmeladkov 6f949085a9 Android: кросс-сборка клиента, SDL-обвязка и сенсорное управление
- client получил lib.rs (общий запуск) и cdylib с экспортом SDL_main;
- steamworks и mlua-фичи разведены по target cfg: на Android нет Steam,
  Lua 5.4 вместо LuaJIT;
- виртуальный стик, обзор свайпом и кнопки прыжка/приседа в map;
- android/: манифест, SDLActivity Java, build.sh (aapt2+d8+apksigner).
2026-10-23 13:37:11 +03:00

44 lines
1.3 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[package]
name = "client"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
[[bin]]
name = "gmod-rs"
path = "src/main.rs"
[dependencies]
engine.workspace = true
fs.workspace = true
formats.workspace = true
math.workspace = true
net.workspace = true
render.workspace = true
tier.workspace = true
anyhow.workspace = true
clap.workspace = true
crc32fast.workspace = true
png = "0.18"
pollster.workspace = true
sdl3.workspace = true
tracing.workspace = true
wgpu.workspace = true
glua = { version = "0.1.0", path = "../lua" }
# Steamworks есть только под нативную платформу: на Android его нет.
[target.'cfg(not(target_os = "android"))'.dependencies]
mlua = { version = "0.11.6", features = ["luajit", "vendored"] }
steamworks = "0.13"
# На Android LuaJIT не собирается кросс-компилятором mlua, поэтому берём
# обычный Lua 5.4 (vendored): API GMod-скриптов от этого не страдает.
[target.'cfg(target_os = "android")'.dependencies]
mlua = { version = "0.11.6", features = ["lua54", "vendored"] }
# CDylib нужен Android: SDLActivity грузит `libmain.so` и ищет `SDL_main`.
[lib]
name = "client"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]