The page's reader: a Web Worker with a second instance of the program reads a database (PGN, CBV, ZIP, 7Z) and gives back its text and index; the page puts it together without reading it again (chess_core::PgnIndex, PgnDatabase::into_index / from_index, serde behind a feature). A 13 MB CBV: the longest frame 17 ms in Firefox, 67 ms in Chromium (1000 ms before). platform::open_database is the same on both sides: away from the screen, done when read. The shelf's cards count the games the same way (one file at a time); the counts are kept through platform::fs. Chrome, Edge (File System Access): a chosen file's handle is kept in the browser's storage; at the next visit the file is read again by itself when the browser allows it, else the card offers «Allow reading» (the browser's own question). Files of different visits get folders of their own. Checks: t.choose(files, open) for both browsers (in Chromium the handles of the site's private file system stand for the dialog's); app.mjs checks the draft, the question on leaving and the remembered file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
94 lines
3.2 KiB
TOML
94 lines
3.2 KiB
TOML
[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
|
|
|
|
# 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
|
|
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-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"
|
|
|
|
# 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"] }
|
|
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",
|
|
"HtmlMediaElement", "HtmlCanvasElement", "console", "CacheStorage", "Cache",
|
|
"Request", "Response", "ResponseInit", "Headers", "ReadableStream",
|
|
"ReadableStreamDefaultReader", "StorageManager", "StorageEstimate", "History",
|
|
"BeforeUnloadEvent", "WorkerOptions", "WorkerType",
|
|
] }
|
|
|
|
[build-dependencies]
|
|
winresource = "0.1"
|
|
|
|
[dev-dependencies]
|
|
skrifa = "0.44"
|