chessbaseLinux/apps/desktop/Cargo.toml

95 lines
3.2 KiB
TOML
Raw Normal View History

[package]
name = "chesspenguin"
description = "Chess database for Linux: view, enter and analyse PGN games with UCI engines"
version.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Web version, stage 1: the interface as a library over a platform layer; apps/web apps/desktop becomes a library (chesspenguin_app: the interface) and a thin binary; apps/web starts the same interface in a page's canvas (eframe's WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser. The platform layer (apps/desktop/src/platform): the program's folders, files, background work, the files the user opens or saves, the clipboard and what the platform offers (CAPS). On a computer it is the system as before; in a browser the program's data lives in IndexedDB behind an in-memory file tree loaded before the start, the files the user opens are read into it for the session (only read), background jobs run on the page's thread after the frame, the clipboard is read through the browser's API, sounds play through audio elements, a game is saved as a download. What a browser does not have is not built for it: updates, the online games window and its probe, engine processes (analysis starts a Web Worker there; the review and preparation jobs, Rodent and the judge are native), blocking requests (engine, Maia and Rodent downloads report no download for the platform, translation reports that it makes no requests). The desktop program behaves as before; its build finds unused code (the web build compiles parts it never shows). apps/web: the entry point, the page /app/ (device check before anything large is loaded: phones and tablets get the page about the apps in the site's nine languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile web), a static server and headless Firefox checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:09:17 +03:00
# The interface, shared with the web version (apps/web); src/main.rs starts it in a
# window.
[lib]
name = "chesspenguin_app"
path = "src/lib.rs"
[[bin]]
name = "chesspenguin"
path = "src/main.rs"
[dependencies]
chess-core.workspace = true
maia.workspace = true
game-review.workspace = true
Opponent prep: the desktop screen (dialog, report, engine run) The «Prepare against…» entry points in the library (the filter panel's button when a player is set, the game row's context menu, Ctrl+Shift+P), the dialog (database, the player's spellings with the similar names apart, colour, book) and the report screen in the stack between the library and the game: the repertoire tree with transpositions, opening names, scores and the book column, the openings table by family and variation, the errors tab (repeated errors and by opening), the board of the chosen position with the line under it, and the games of the selection, which open in the game screen at that move with «⬅ Back to preparation». The engine run reuses the game analysis job over the distinct opening positions of the chosen colour: the launch dialog shares the engine picker and the quality/threads/memory grid with review.rs (quality «Fast» by default, its own setting), marks appear as positions are evaluated, «Stop» keeps what was done, the evaluations and the report are cached under <cache>/prep. One engine job per program: game analysis and the live engine are blocked meanwhile. Core: targets and counts by colour (`targets_for`, `missing_for`), the book step keeps its per-position counts (`book_counts`) for the tree column. Narrow windows: the board stacks over the lists under 804 px and folds into a button under 720 px of height; the right column is split explicitly (a nested bottom panel is not reserved from the content above it in egui). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-28 15:43:15 +03:00
prep.workspace = true
chess-import.workspace = true
shakmaty.workspace = true
uci.workspace = true
egui.workspace = true
eframe.workspace = true
egui_extras.workspace = true
image.workspace = true
directories.workspace = true
trainer.workspace = true
play.workspace = true
serde.workspace = true
serde_json.workspace = true
online-games.workspace = true
Web version, stage 1: the interface as a library over a platform layer; apps/web apps/desktop becomes a library (chesspenguin_app: the interface) and a thin binary; apps/web starts the same interface in a page's canvas (eframe's WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser. The platform layer (apps/desktop/src/platform): the program's folders, files, background work, the files the user opens or saves, the clipboard and what the platform offers (CAPS). On a computer it is the system as before; in a browser the program's data lives in IndexedDB behind an in-memory file tree loaded before the start, the files the user opens are read into it for the session (only read), background jobs run on the page's thread after the frame, the clipboard is read through the browser's API, sounds play through audio elements, a game is saved as a download. What a browser does not have is not built for it: updates, the online games window and its probe, engine processes (analysis starts a Web Worker there; the review and preparation jobs, Rodent and the judge are native), blocking requests (engine, Maia and Rodent downloads report no download for the platform, translation reports that it makes no requests). The desktop program behaves as before; its build finds unused code (the web build compiles parts it never shows). apps/web: the entry point, the page /app/ (device check before anything large is loaded: phones and tablets get the page about the apps in the site's nine languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile web), a static server and headless Firefox checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:09:17 +03:00
web-time.workspace = true
sha2 = "0.11"
zip = { version = "9.0.5", default-features = false, features = ["deflate-flate2-zlib-rs"] }
# The system language for the first start.
sys-locale = "0.3"
whatlang = "0.18.0"
getrandom = "0.3"
# Today's date for a new game.
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
# Warnings of the window and graphics libraries into chesspenguin.log.
log = "0.4"
base64 = "0.22"
form_urlencoded = "1"
Web version, stage 1: the interface as a library over a platform layer; apps/web apps/desktop becomes a library (chesspenguin_app: the interface) and a thin binary; apps/web starts the same interface in a page's canvas (eframe's WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser. The platform layer (apps/desktop/src/platform): the program's folders, files, background work, the files the user opens or saves, the clipboard and what the platform offers (CAPS). On a computer it is the system as before; in a browser the program's data lives in IndexedDB behind an in-memory file tree loaded before the start, the files the user opens are read into it for the session (only read), background jobs run on the page's thread after the frame, the clipboard is read through the browser's API, sounds play through audio elements, a game is saved as a download. What a browser does not have is not built for it: updates, the online games window and its probe, engine processes (analysis starts a Web Worker there; the review and preparation jobs, Rodent and the judge are native), blocking requests (engine, Maia and Rodent downloads report no download for the platform, translation reports that it makes no requests). The desktop program behaves as before; its build finds unused code (the web build compiles parts it never shows). apps/web: the entry point, the page /app/ (device check before anything large is loaded: phones and tablets get the page about the apps in the site's nine languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile web), a static server and headless Firefox checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:09:17 +03:00
# The desktop program: native dialogs, the clipboard, sound, the network (updates,
# engines and Maia on request, online games, translation).
[target.'cfg(not(target_family = "wasm"))'.dependencies]
rfd.workspace = true
arboard.workspace = true
rodio.workspace = true
releases.workspace = true
# Downloading the official Stockfish on request (decision 14).
ureq = "3.4"
flate2 = "1.1"
tar = "0.4"
# The web version: the page, its files and storage (apps/web starts it).
[target.'cfg(target_family = "wasm")'.dependencies]
# The reader worker gives the page a database's index (platform::web::import).
chess-core = { workspace = true, features = ["serde"] }
Web version, stage 1: the interface as a library over a platform layer; apps/web apps/desktop becomes a library (chesspenguin_app: the interface) and a thin binary; apps/web starts the same interface in a page's canvas (eframe's WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser. The platform layer (apps/desktop/src/platform): the program's folders, files, background work, the files the user opens or saves, the clipboard and what the platform offers (CAPS). On a computer it is the system as before; in a browser the program's data lives in IndexedDB behind an in-memory file tree loaded before the start, the files the user opens are read into it for the session (only read), background jobs run on the page's thread after the frame, the clipboard is read through the browser's API, sounds play through audio elements, a game is saved as a download. What a browser does not have is not built for it: updates, the online games window and its probe, engine processes (analysis starts a Web Worker there; the review and preparation jobs, Rodent and the judge are native), blocking requests (engine, Maia and Rodent downloads report no download for the platform, translation reports that it makes no requests). The desktop program behaves as before; its build finds unused code (the web build compiles parts it never shows). apps/web: the entry point, the page /app/ (device check before anything large is loaded: phones and tablets get the page about the apps in the site's nine languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile web), a static server and headless Firefox checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:09:17 +03:00
getrandom = { version = "0.3", features = ["wasm_js"] }
# The browser's languages for the first start.
sys-locale = { version = "0.3", features = ["js"] }
# Today's date from the browser's clock.
chrono = { version = "0.4", default-features = false, features = ["clock", "std", "wasmbind"] }
wasm-bindgen = "0.2.129"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
web-sys = { version = "0.3", features = [
"Window", "Document", "Element", "HtmlElement", "HtmlInputElement", "HtmlAnchorElement",
"File", "FileList", "Blob", "BlobPropertyBag", "Url", "Event", "Location", "Navigator",
"Storage", "UrlSearchParams", "EventTarget", "CssStyleDeclaration", "Clipboard",
"IdbFactory", "IdbDatabase", "IdbOpenDbRequest", "IdbRequest", "IdbTransaction",
"IdbTransactionMode", "IdbObjectStore", "DomStringList", "HtmlAudioElement",
Web version, stage 2: Stockfish 19 in workers, live analysis, game review on N workers, My games, files, keys game-review: what the job does for one target (the full search, the second best without the move played, the shallow ones) becomes a machine without I/O (job/work.rs), driven by the engine processes on a computer (job/engines.rs, the same searches as before) and by Web Workers in a browser (job/workers.rs: a dispatcher polled from the frames, never blocking). The analysis cache goes through a CacheStore (a folder, or the program's files of the platform). The browser's engine: Stockfish.js 19.0.1 (npm stockfish, GPL-3.0), its single-threaded build served beside /app/ (engine/, build.sh checks the package's sha512), its 99 MB wasm downloaded only through the engine offer, checked against its SHA-256 and kept in Cache Storage; workers get it as a blob: address. Live analysis (lines, arrows, the bar) and the review run on it; the review uses one worker per logical CPU, at most 8. My games (the web version): a PGN in the browser's storage, always on the shelf; Ctrl+S puts a game there (its own record, or a new one); deleting with undo. chess-core's store gives the bytes of append/replace/remove/restore, so the platform writes them into the browser's files; on a computer the files are written as before. Settings: Browser data (used and free space, keeping the data for good, Download all as PGN, deleting the engine). Files: a file of the last visit offers Choose the file again; Keep a copy in the browser (refused with the room it needs when the browser gives too little); files over 1 GB are not opened, with a word on why. No reference tab and no search by position in the web version. Keys: Alt+Left, plain 1-6, Ctrl+C, N in the library (the browser keeps Ctrl+W/N/1-6/Shift+C). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:35:16 +03:00
"HtmlMediaElement", "HtmlCanvasElement", "console", "CacheStorage", "Cache",
"Request", "Response", "ResponseInit", "Headers", "ReadableStream",
"ReadableStreamDefaultReader", "StorageManager", "StorageEstimate", "History",
"BeforeUnloadEvent", "WorkerOptions", "WorkerType",
Web version, stage 1: the interface as a library over a platform layer; apps/web apps/desktop becomes a library (chesspenguin_app: the interface) and a thin binary; apps/web starts the same interface in a page's canvas (eframe's WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser. The platform layer (apps/desktop/src/platform): the program's folders, files, background work, the files the user opens or saves, the clipboard and what the platform offers (CAPS). On a computer it is the system as before; in a browser the program's data lives in IndexedDB behind an in-memory file tree loaded before the start, the files the user opens are read into it for the session (only read), background jobs run on the page's thread after the frame, the clipboard is read through the browser's API, sounds play through audio elements, a game is saved as a download. What a browser does not have is not built for it: updates, the online games window and its probe, engine processes (analysis starts a Web Worker there; the review and preparation jobs, Rodent and the judge are native), blocking requests (engine, Maia and Rodent downloads report no download for the platform, translation reports that it makes no requests). The desktop program behaves as before; its build finds unused code (the web build compiles parts it never shows). apps/web: the entry point, the page /app/ (device check before anything large is loaded: phones and tablets get the page about the apps in the site's nine languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile web), a static server and headless Firefox checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:09:17 +03:00
] }
[build-dependencies]
winresource = "0.1"
[dev-dependencies]
skrifa = "0.44"