Skip to content

Use latest doublets-rs (0.3.0) and switch to stable Rust#24

Merged
konard merged 3 commits into
mainfrom
issue-23-dff35da4182d
May 29, 2026
Merged

Use latest doublets-rs (0.3.0) and switch to stable Rust#24
konard merged 3 commits into
mainfrom
issue-23-dff35da4182d

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented May 29, 2026

Summary

Resolves the two core requirements of #23:

  1. Upgrade to the latest doublets-rs — replaced the git-pinned pre-release
    0.1.0-pre+beta.15 with the published crates.io release doublets = "0.3.0"
    (the newest version; confirmed via cargo search doublets).
  2. Switch to stable Rustrust-toolchain.toml and the CI workflow now use
    stable; all nightly feature gates (allocator_api, generic_associated_types)
    and nightly-only API usage have been removed/migrated.

It also delivers the documentation deliverables the issue asks for: a deep case
study in docs/case-studies/issue-23/
covering every requirement (R1–R8), online research, root-cause analysis,
per-requirement solution plans, and a survey of existing components/libraries.

API migration map (nightly beta.15 → stable 0.3.0)

Old (nightly) New (stable)
#![feature(allocator_api, generic_associated_types)] (removed — GATs stable since 1.65; allocator_api provided via allocator-api2)
Alloc<T, std::alloc::Global> doublets::mem::Global<T> (built with Global::new())
doublets::data::LinkType doublets::data::LinkReference
T::ZERO T::from_byte(0)
value.as_i64() as_i64(value) helper wrapping TryInto<i64>
handler(link)? (relied on nightly Try for Flow) if handler(link).is_break() { return Flow::Break; }
doublets::parts::LinkPart doublets::unit::LinkPart
toolchain nightly-2022-08-22 toolchain stable

The PostgreSQL backend logic (client.rs, transaction.rs) needed only
mechanical symbol renames because doublets's Links<T>/Doublets<T> traits
kept their Link<T>-based handler signatures. Exclusive<T> already satisfies
the new Send + Sync bound on Links<T>.

Verification

$ cargo build --release --all-features --manifest-path rust/Cargo.toml   # OK
$ cargo bench --no-run --all-features                                    # OK (all bench binaries compile)
$ grep -rn '#![feature' rust/src rust/benches                            # no matches

rustc 1.95.0 (stable). Benchmarks connect to PostgreSQL only at runtime, which
CI provides via its postgres service; locally, compilation is the verifiable
step.

Files changed

  • rust-toolchain.toml, .github/workflows/rust.yml — toolchain → stable
  • rust/Cargo.toml, rust/Cargo.lockdoublets = "0.3.0"
  • rust/src/{lib,client,transaction}.rs, rust/src/benched/* — API migration
  • rust/benches/** — removed #![feature], Alloc<…>Global<…>
  • docs/case-studies/issue-23/README.md — case study (R3–R7)

Closes #23

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #23
@konard konard self-assigned this May 29, 2026
konard added 2 commits May 29, 2026 22:13
- Switch rust-toolchain.toml and CI workflow from nightly-2022-08-22 to stable
- Bump doublets dependency from git (0.1.0-pre+beta.15) to crates.io 0.3.0
- Replace nightly features (allocator_api, generic_associated_types) usage:
  - Alloc<T, std::alloc::Global> -> doublets::mem::Global<T> (Global::new())
  - Remove #![feature(allocator_api)] from benches
- Migrate API: LinkType -> LinkReference, T::ZERO -> T::from_byte(0),
  .as_i64() -> as_i64() helper (TryInto<i64>)
- Handle Flow without nightly Try: handler(..)? -> is_break() + early return
- Fix elided-lifetime lint in Benched::fork signatures
- Remove placeholder .gitkeep

Refs #23
Document in docs/case-studies/issue-23/:
- All extracted requirements (R1-R8) with resolution status
- Online research: doublets-rs release history, v0.3.0 BREAKING notes,
  transitive dependency versions (platform-mem/data/num, allocator-api2)
- Root-cause analysis of the prior nightly requirement
- Per-requirement solution options with chosen approach + full API migration map
- Survey of existing components/libraries
- Evidence and verification steps

Refs #23
@konard konard changed the title [WIP] Make sure to use latest version of doublets-rs, and make sure to switch to stable rust Use latest doublets-rs (0.3.0) and switch to stable Rust May 29, 2026
@konard konard marked this pull request as ready for review May 29, 2026 22:16
@konard
Copy link
Copy Markdown
Member Author

konard commented May 29, 2026

Working session summary

CI is still running the benchmarks. The background poller (bd41k7kyn) will notify me when the run completes. Let me summarize the current state while waiting.

All implementation work is complete and pushed. Here's where things stand:

Completed:

  • R1 — Latest doublets-rs: doublets = "0.3.0" (crates.io, confirmed latest)
  • R2 — Stable Rust: rust-toolchain.toml + CI use stable; all #![feature(...)] gates and nightly-only API removed. Verified locally with cargo build --release and cargo bench --no-run on rustc 1.95.0.
  • R3–R7 — Case study: docs/case-studies/issue-23/README.md with requirements table, online research, root-cause analysis, per-requirement solution plans, and component survey.
  • R8 — Single PR: commits on issue-23-dff35da4182d; PR Use latest doublets-rs (0.3.0) and switch to stable Rust #24 retitled (removed [WIP]), description rewritten, marked ready for review.

In progress: Waiting on CI run 26664990689 (the "Benchmark Rust version" workflow, which builds on stable and runs cargo bench against a live PostgreSQL service) to confirm green.

I'll report the CI conclusion as soon as the run finishes.


This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 29, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.198766
  • Calculated by Anthropic: $8.165360
  • Difference: $-0.033406 (-0.41%)

📊 Context and tokens usage:

Claude Opus 4.8: (2 sub-sessions)

  1. 116.3K / 1M (12%) input tokens, 28.5K / 128K (22%) output tokens
  2. 97.2K / 1M (10%) input tokens, 28.8K / 128K (23%) output tokens

Total: (21.2K new + 343.8K cache writes + 9.0M cache reads) input tokens, 57.3K output tokens, $8.198766 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.8 (claude-opus-4-8)

📎 Log file uploaded as Gist (3362KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 29, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit c6424da into main May 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make sure to use latest version of doublets-rs, and make sure to switch to stable rust

1 participant