online-games, play, prep: what needs processes or blocking requests is not built for a browser
online-games: the network part (lookups, probes, downloads into the database, with their tests) moves to net.rs, built where a request may block a thread; ureq is a dependency there only. The names, paths and states of the online databases stay for every target. play: the engines that play (Rodent) or judge (Maia's resignations) run as processes driven from threads: not built for WebAssembly. getrandom has its browser backend there. prep: analyse (the job in engine processes) is native. Nothing changes on the computer or Android; the tests pass as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2703e5de38
commit
1e0fb082e5
8 changed files with 1033 additions and 981 deletions
|
|
@ -21,7 +21,9 @@ use std::sync::atomic::{AtomicBool, AtomicUsize};
|
|||
use std::time::SystemTime;
|
||||
|
||||
use chess_import::Database;
|
||||
use game_review::{JobEvent, JobFailure, JobSettings, SEARCH_NODES, SEARCH_VERSION, Target};
|
||||
use game_review::{JobEvent, SEARCH_NODES, SEARCH_VERSION, Target};
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use game_review::{JobFailure, JobSettings};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uci::EnginePosition;
|
||||
|
||||
|
|
@ -617,6 +619,8 @@ pub struct Progress {
|
|||
pub nps: u64,
|
||||
}
|
||||
|
||||
// The engines run as processes, each driven from a thread: not in a browser.
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
/// Runs the engine over the positions `report` lacks (the cache
|
||||
/// is consulted first and fed as results come; `cache_dir` saves it every few
|
||||
/// hundred positions and at the end), updating the report as results come in.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue