Repository navigation
Document Rust applications and publish versioned SDK reference - #8422
Merged
Merged
Conversation
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve compaction retry semantics, reject unsupported HTTP status codes, and keep the CI test bucket inventory in sync. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Stabilize the C ABI, preserve Cargo dependency tracking, register Rust unit tests, enforce unwind panics, and clarify native application trust semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
The /app/panic endpoint correctly returns HTTP 500, but Rust's default panic hook writes fixed lines to node stderr, which tests/infra/network.py treats as fatal at shutdown. Narrowly catch NetworkShutdownError and only ignore it when every stderr line matches the exact expected panic-hook output; anything else still fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve test-body failures during expected panic teardown, validate response headers before serialization, and support Cargo library names that differ from package names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adopt the label-aggregate build targets from main so that the CI bucket C job builds the Rust sample app: the e2e test is renamed to e2e_basic_rust (the basic_rust name is taken by the app target) and declares BUILD_DEPENDS basic_rust; ccf_app_rust_test gets a same-named target and the unit label via add_test_label. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: cjen1-msft <chrisjensen@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a source-backed tutorial, public SDK contracts and doctests, and SDK-only rustdoc generation integrated with CCF's versioned Sphinx documentation. Validate generated API links and document the experimental interface's limits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Base automatically changed from
achamayou-rust-interface-exploration
to
main
September 24, 2026 16:59
#8200 was squash-merged into main, so resolve by taking main's final Rust interface and re-applying only this branch's documentation commit. Keep main's experimental warning, bridge/linking notes and panic-hook support, and update docs that described superseded behaviour: the installed bridge is now a precompiled object, and empty error codes are accepted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shorten the Rust guide, API landing page, contributor notes and SDK rustdoc, keeping the runnable walkthrough, doctests and compile-fail checks. Merge the execution and KV sections into one list of handler rules, and replace per-method contract essays with one- or two-line summaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
September 28, 2026 09:11
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Rustdoc output may retain stale pages, and transaction-commit wording needs clarification.
Review effort: Lite
Findings: None
What changed in this PR
Expands experimental Rust application documentation and publishes versioned Rust SDK rustdoc alongside Sphinx documentation.
Changes:
- Adds Rust SDK guides, examples, API documentation, doctests, and capability limits.
- Adds versioned rustdoc generation, link validation, and CI tests.
- Documents build, authentication, KV, logging, and sandbox workflows.
| File | Description |
|---|---|
src/rust/ccf-app/src/lib.rs |
Adds SDK documentation and doctests. |
samples/apps/basic_rust/src/lib.rs |
Adds documentation snippet markers. |
doc/test_rustdoc.py |
Tests rustdoc generation and link validation. |
doc/rustdoc.py |
Generates and validates versioned rustdoc. |
doc/contribute/build_ccf.rst |
Documents rustdoc build behavior. |
doc/conf.py |
Registers the rustdoc extension. |
doc/build_apps/rust_api.rst |
Adds the Rust SDK API reference. |
doc/build_apps/logging.rst |
Documents Rust logging limitations. |
doc/build_apps/kv/index.rst |
Clarifies Rust KV behavior. |
doc/build_apps/index.rst |
Adds Rust API navigation. |
doc/build_apps/get_started.rst |
Links to the Rust API reference. |
doc/build_apps/example_rust.rst |
Adds the Rust application walkthrough. |
doc/build_apps/build_app.rst |
Clarifies native Rust application builds. |
doc/build_apps/auth/index.rst |
Documents Rust authentication limitations. |
.github/workflows/ci.yml |
Runs documentation helper tests in CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The docs CTest test already runs the rustdoc extension end to end with warnings as errors, so drop the mocked helper tests and the extra CI step that ran them outside CTest. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the trait's summary from #8200, and name the trait in the guide's handler rules instead of listing its Send and Sync bounds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix the installed-SDK sandbox command, which resolved a relative package path against the install's bin directory, and note that retries also discard the response. Align terminology across the guide, API page, notes and rustdoc, drop the redundant sandbox constitution flag, and show the registration function's signature. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The guide tells readers to copy the sample, which also registers unauthenticated test-only endpoints, including KV writes. Restore the instruction to remove them, where the copy is described. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Max (maxtropets)
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Follows #8200. The Rust guide describes the experimental interface, but has no runnable walkthrough and no API reference.
Implementation summary
samples/apps/basic_rust, followed by a short list of handler rules.rustdocSphinx extension, like the existing TypeDoc integration, that runscargo docon the SDK for each documentation version, publishes it underrust/, and checks:rustdoc:links. Versions without the SDK are skipped, and failures are fatal.Validated with the warnings-as-errors Sphinx build, SDK tests and doctests, and
scripts/ci-checks.sh.Safety and compatibility
Documentation only: no runtime, ABI, ledger, consensus or compatibility impact. Rust changes are doc comments, doc lints and
#[doc(hidden)]attributes, and sample changes are snippet markers. The docs build runscargo docon the SDK only, not a CCF build;SKIP_RUSTDOCis for local previews and is not used in CI or publishing.