2026-10-18 01:54:06 +03:00
|
|
|
[package]
|
|
|
|
|
name = "uci"
|
|
|
|
|
version.workspace = true
|
|
|
|
|
edition.workspace = true
|
|
|
|
|
rust-version.workspace = true
|
|
|
|
|
license.workspace = true
|
uci: the engine as a Web Worker in a browser, on the same protocol machine; game-review: the process job is native
On WebAssembly the engine is a Web Worker: a line of UCI is one message each
way, the protocol machine is driven by the worker's messages and by timers set
for its deadlines; the handshake does not block (Engine::start_worker gives a
Starting, polled until readyok). EngineHandle has the same methods as the
process one, minus those that block or name a process. Option and search
checks are shared by both transports.
tests/worker.rs runs the worker transport against a fake engine in JavaScript
in headless Firefox (apps/web/check/uci-worker.mjs: wasm-bindgen-test-runner
serves, a WebDriver BiDi client reads the outcome): handshake, analysis and
stop, coalescing of rapid requests without mixing output, an engine hung on
stop, a crash, and every handshake failure. 5 of 5 pass.
game-review: the job in engine processes (run and its workers) moves to
job/engines.rs, built where there are processes. .cargo/config.toml: the
getrandom backend of WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:29:12 +03:00
|
|
|
description = "UCI chess engine supervisor: a process, or a Web Worker in a browser (no UI dependencies)"
|
2026-10-18 01:54:06 +03:00
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
thiserror.workspace = true
|
2026-10-30 14:19:21 +03:00
|
|
|
web-time.workspace = true
|
2026-10-18 01:54:06 +03:00
|
|
|
|
uci: the engine as a Web Worker in a browser, on the same protocol machine; game-review: the process job is native
On WebAssembly the engine is a Web Worker: a line of UCI is one message each
way, the protocol machine is driven by the worker's messages and by timers set
for its deadlines; the handshake does not block (Engine::start_worker gives a
Starting, polled until readyok). EngineHandle has the same methods as the
process one, minus those that block or name a process. Option and search
checks are shared by both transports.
tests/worker.rs runs the worker transport against a fake engine in JavaScript
in headless Firefox (apps/web/check/uci-worker.mjs: wasm-bindgen-test-runner
serves, a WebDriver BiDi client reads the outcome): handshake, analysis and
stop, coalescing of rapid requests without mixing output, an engine hung on
stop, a crash, and every handshake failure. 5 of 5 pass.
game-review: the job in engine processes (run and its workers) moves to
job/engines.rs, built where there are processes. .cargo/config.toml: the
getrandom backend of WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:29:12 +03:00
|
|
|
# The engine as a Web Worker in a browser.
|
|
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
|
|
|
wasm-bindgen = "0.2.129"
|
|
|
|
|
js-sys = "0.3"
|
|
|
|
|
web-sys = { version = "0.3", features = ["Worker", "MessageEvent", "ErrorEvent"] }
|
|
|
|
|
|
2026-10-23 02:06:08 +03:00
|
|
|
[target.'cfg(unix)'.dependencies]
|
2026-10-31 13:51:29 +03:00
|
|
|
# nice(2) for EngineConfig::nice, prctl(2) for kill_with_parent (std has neither).
|
2026-10-23 02:06:08 +03:00
|
|
|
libc = "0.2"
|
|
|
|
|
|
2026-10-18 01:54:06 +03:00
|
|
|
# Test helper: deterministic fake UCI engine used by tests/ via CARGO_BIN_EXE_fake_uci.
|
|
|
|
|
[[bin]]
|
|
|
|
|
name = "fake_uci"
|
|
|
|
|
path = "src/bin/fake_uci.rs"
|
|
|
|
|
test = false
|
|
|
|
|
doc = false
|
uci: the engine as a Web Worker in a browser, on the same protocol machine; game-review: the process job is native
On WebAssembly the engine is a Web Worker: a line of UCI is one message each
way, the protocol machine is driven by the worker's messages and by timers set
for its deadlines; the handshake does not block (Engine::start_worker gives a
Starting, polled until readyok). EngineHandle has the same methods as the
process one, minus those that block or name a process. Option and search
checks are shared by both transports.
tests/worker.rs runs the worker transport against a fake engine in JavaScript
in headless Firefox (apps/web/check/uci-worker.mjs: wasm-bindgen-test-runner
serves, a WebDriver BiDi client reads the outcome): handshake, analysis and
stop, coalescing of rapid requests without mixing output, an engine hung on
stop, a crash, and every handshake failure. 5 of 5 pass.
game-review: the job in engine processes (run and its workers) moves to
job/engines.rs, built where there are processes. .cargo/config.toml: the
getrandom backend of WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:29:12 +03:00
|
|
|
|
|
|
|
|
# tests/worker.rs: the worker transport in a browser (docs/dev/web.md).
|
|
|
|
|
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
|
|
|
|
wasm-bindgen-test = "0.3"
|
|
|
|
|
wasm-bindgen-futures = "0.4"
|
|
|
|
|
web-sys = { version = "0.3", features = ["Window", "Blob", "BlobPropertyBag", "Url"] }
|