Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ddss-sys
Generated bindings to bsalita/ddss, a
performance-oriented fork of DDS, the C++
double dummy solver for contract bridge. The fork is based on DDS 2.9.0 and
its headline addition is CalcAllTablesPBNx, a dynamic-size batch API that
accepts any number of deals in one call and internally chunks and schedules
across a persistent thread pool. The author reports ~1.44× batched throughput
over the same-version upstream.
This is a separate crate from dds-bridge-sys
and is not a drop-in replacement for it:
- ddss is based on DDS 2.9 (global state + internal thread pool), not DDS 3.x.
There is no
SolverContextC++ class and no per-thread context C shim. - ddss bumps
MAXNOOFTABLES(40→1000) andMAXNOOFBOARDS(200→5000), so the legacy batch structs (boards,boardsPBN,ddTablesDealsPBN,solvedBoards, …) have larger sizes here than in upstream DDS and are not ABI-compatible.
Linking both dds-bridge-sys and ddss-sys into the same binary is not
supported — they export the same C symbols (SetMaxThreads, SolveBoard,
CalcDDtable, …) and will collide.
Status
ddss is a single-maintainer fork (1 star, 0 forks at the time of writing).
The vendored submodule is pinned to a specific commit on the develop branch.
Treat this crate as experimental.
Usage
The library needs manual initialization — call
SetMaxThreads
once before any other API:
// 0 stands for automatic configuration based on available cores
unsafe ;
ddss inherits DDS 2.9's threading model: the legacy entry points are not reentrant. If you call them from multiple threads, serialize the calls with a mutex.
The fork-specific batch API
// PBN deal: "<dealer>:<N hand> <E hand> <S hand> <W hand>",
// each hand as "spades.hearts.diamonds.clubs". The cards[80] buffer
// is null-terminated. Here N has all clubs, E all diamonds, S all
// hearts, W all spades.
const PBN: & = b"N:...AKQJT98765432 ..AKQJT98765432. .AKQJT98765432.. AKQJT98765432...\0";
let mut deal = default;
assert!;
for in deal.cards.iter_mut.zip
unsafe ;
let mut deals = ;
let mut trump_filter = ; // 0 = solve every strain
let mut results = ;
let status = unsafe ;
assert_eq!;
CalcAllTablesPBNx accepts batches of any size: it splits internally into
fixed-size chunks bounded by MAXNOOFTABLES per call to the worker.
Cargo features
All features are off by default. The debug-* features each gate the
corresponding DDS_* C++ macro in the ddss vendor; enabling them causes the
solver to write .txt diagnostic files into the current working directory at
runtime. Intended for solver development, not production use.
debug-dump— let DDS writedump.txton solver errorsdebug-top-level— top-level AB call info →toplevel*.txt(per thread)debug-ab-stats— alpha-beta search stats →ABstats*.txt(per thread)debug-tt-stats— transposition-table memory usage →TTstats*.txt(per thread)debug-timing— function timings →timer*.txt(per thread)debug-moves— move-generation quality →movestats*.txt(per thread)
License
Apache-2.0, matching upstream DDS and ddss.