[package]
name = "hnefatafl-copenhagen"
version = "5.2.0"
authors = ["David Campbell <david@hnefatafl.org>"]
edition = "2024"
rust-version = "1.89"
description = "Copenhagen Hnefatafl client, engine, server and artificial intelligence"
documentation = "https://docs.rs/hnefatafl-copenhagen/"
readme = "README.md"
homepage = "https://hnefatafl.org"
repository = "https://github.com/dcampbell24/hnefatafl"
license = "AGPL-3.0-or-later"
keywords = ["board-game", "copenhagen", "hnefatafl", "strategy", "tafl"]
categories = ["game-engines", "games", "wasm"]
default-run = "hnefatafl-server-full"
# Only these files are licensed under the AGPLv3:
include = ["src/**/*", "README.md", "CHANGELOG.md", "COPYING"]
[dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
csv = "1"
# client
[target.'cfg(not(target_os = "redox"))'.dependencies.iced]
version = "0.14"
features = ["advanced-shaping", "fira-sans", "image", "smol"]
optional = true
# client
[target.'cfg(target_os = "redox")'.dependencies.iced]
version = "0.14"
features = [
"tiny-skia", "crisp", "web-colors", "thread-pool", "linux-theme-detection", "x11", "wayland",
"advanced-shaping", "fira-sans", "image", "smol"
]
optional = true
default-features = false
[dependencies]
anyhow = "1"
# burn = { version = "0.16", features = ["train", "wgpu", "vision"] }
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4", features = ["derive"] }
clap_mangen = "0.2"
directories = "6"
env_logger = "0.11"
log = "0.4"
postcard = { version = "1", features = ["alloc"] }
rand = "0.10"
rayon = "1"
ron = { version = "0.12", features = ["integer128"] }
rustc-hash = "2"
rust-i18n = "3"
serde = { version = "1", features = ["derive", "rc"] }
thiserror = "2"
toml = { version = "1", optional = true }
# client
image = { version = "0.25", default-features = false, features = ["png"], optional = true }
rodio = { version = "0.22", default-features = false, features = ["playback", "vorbis"], optional = true }
smol_str = { version = "0.3", optional = true }
webbrowser = { version = "1", features = ["hardened"], optional = true }
# js engine
getrandom = { version = "0.4", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
# not js engine
socket2 = { version = "0.6", features = ["all"], optional = true }
# send-website-urls
reqwest = { version = "0.13", features = ["blocking"], optional = true }
# server
argon2 = { version = "0.5", optional = true }
ctrlc = { version = "3", features = ["termination"], optional = true }
itertools = { version = "0.14.0", optional = true }
lettre = { version = "0.11", optional = true }
old_rand = { package = "rand", version = "0.8", optional = true }
password-hash = { version = "0.5", optional = true }
[features]
default = ["client", "server", "toml"]
client = ["dep:iced", "dep:image", "dep:rodio", "dep:smol_str", "socket", "dep:webbrowser"]
console = []
debug = ["iced?/debug"]
js = ["dep:wasm-bindgen", "getrandom/wasm_js", "iced?/web-colors", "iced?/webgl"]
runic = []
server = ["dep:argon2", "dep:ctrlc", "dep:itertools", "dep:lettre", "dep:old_rand", "dep:password-hash", "socket"]
socket = ["dep:socket2"]
toml = ["dep:toml"]
# client
icon_2 = []
# send-website-urls
urls = ["dep:reqwest"]
[lib]
crate-type = ["cdylib", "rlib"]
bench = false
doctest = false
[[bin]]
name = "count-keys"
required-features = ["toml"]
bench = false
test = false
[[bin]]
name = "hnefatafl-ai"
bench = false
test = false
[[bin]]
name = "hnefatafl-client"
required-features = ["client"]
bench = false
test = false
[[bin]]
name = "hnefatafl-server"
bench = false
test = false
[[bin]]
name = "hnefatafl-text-protocol"
bench = false
test = false
[[bin]]
name = "hnefatafl-server-full"
required-features = ["server"]
bench = false
[[bin]]
name = "icelandic-runic"
required-features = ["runic"]
bench = false
test = false
[[bin]]
name = "send-website-urls"
required-features = ["urls"]
bench = false
test = false
[[bench]]
name = "hnefatafl_rs"
harness = false
[lints.clippy]
cargo = "deny"
complexity = "deny"
correctness = "deny"
pedantic = "deny"
perf = "deny"
style = "deny"
suspicious = "deny"
multiple_crate_versions = { level = "allow", priority = 1 }
# To update the icon cache: rm ~/.cache/icon-cache.kcache
# Then log out and in.
[package.metadata.deb]
copyright = "2025-2026 Developers of the hnefatafl-copenhagen project"
maintainer = "David Campbell <david@hnefatafl.org>"
extended-description = """This package contains an engine, server, client, artificial intelligence and systemd services to run them.
Their are two server binaries. One which is the full version and another just
for running hnefatafl text protocol clients. The pack includes a systemd
service for running the full server.
The artificial intelligence comes with a service for running it as an attacker
and as a defender. When you run the service, the player will repeatedly create
a game and wait for a challenger.
The hnefatafl-text-protocol can be piped to the server or run as a standalone
binary. It has various options such as running a simulation with --ai and
displaying the game with --display-game for a user friendly interface.
The client is a graphical user interface that connects to the server-full. By
default it connects to the server running at hnefatafl.org.
"""
assets = [
["hnefatafl-ai.1.gz", "usr/share/man/man1/", "644"],
["hnefatafl-client.1.gz", "usr/share/man/man1/", "644"],
["hnefatafl-server.1.gz", "usr/share/man/man1/", "644"],
["hnefatafl-server-full.1.gz", "usr/share/man/man1/", "644"],
["hnefatafl-text-protocol.1.gz", "usr/share/man/man1/", "644"],
["assets/helmet.svg", "/usr/share/icons/hicolor/scalable/apps/org.hnefatafl.hnefatafl_client.svg", "644"],
["packages/hnefatafl-client.desktop", "usr/share/applications/", "644"],
["packages/hnefatafl-ai-attacker.service", "usr/lib/systemd/system/", "644"],
["packages/hnefatafl-ai-defender.service", "usr/lib/systemd/system/", "644"],
["packages/hnefatafl.service", "usr/lib/systemd/system/", "644"],
["target/release/hnefatafl-ai", "usr/games/", "755"],
["target/release/hnefatafl-client", "usr/games/", "755"],
["target/release/hnefatafl-server", "usr/games/", "755"],
["target/release/hnefatafl-server-full", "usr/games/", "755"],
["target/release/hnefatafl-text-protocol", "usr/games/", "755"],
]
changelog = "packages/debian/changelog"
revision = "2"
section = "games"
[package.metadata.bundle]
name = "hnefatafl-copenhagen"
identifier = "org.hnefatafl.hnefatafl_client"
icon = [
"assets/helmet.svg",
]
copyright = "2025-2026 Developers of the hnefatafl-copenhagen project"
category = "public.app-category.board-games"
short_description = "Client that connects to a Copenhagen Hnefatafl Server."
osx_url_schemes = ["org.hnefatafl.hnefatafl_client"]
[package.metadata.i18n]
default-locale = "en-US"
available-locales = [
"en-US",
"zh-CN",
"es",
"ar",
"id",
"pt-BR",
"pt-PT",
"fr",
"ja",
"ru",
"de",
"is-IS",
"is-RU",
"sv-SE",
"ko",
]