Skip to content

chore(docs): core/sdk lib.rs and IggyClient docs - #3809

Open
haubur wants to merge 5 commits into
apache:masterfrom
haubur:chore/sdk-docs
Open

chore(docs): core/sdk lib.rs and IggyClient docs#3809
haubur wants to merge 5 commits into
apache:masterfrom
haubur:chore/sdk-docs

Conversation

@haubur

@haubur haubur commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Draft PR as discussed here: https://discord.com/channels/1144142576266530928/1144142825630474360/1507361396382240839

Would be nice to get some feedback on:

  • language (tone towards the user)
  • understandability (level of detail)
  • guidance (easy to follow examples)

If the general direction is good and supported, happy to clean and merge.
Would suggest to continue with IggyConsumer and IggyProducer in a next PR.

Which issue does this PR address?

Closes #3306

Rationale

Adding User facing docs for the Rust SDK.

What changed?

  • proposal for crate level docs in lib.rs
  • docs for the IggyClient type

Local Execution

  • prek run (specifically typo and rust fmt)

AI Usage

Everything is manually written or at least re-written in cases I had claude suggest a formulation.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.02%. Comparing base (01a64b2) to head (dd7440b).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3809      +/-   ##
============================================
- Coverage     76.58%   75.02%   -1.56%     
  Complexity     1046     1046              
============================================
  Files          1347     1347              
  Lines        171018   165645    -5373     
  Branches     142372   137074    -5298     
============================================
- Hits         130967   124283    -6684     
- Misses        36233    37241    +1008     
- Partials       3818     4121     +303     
Components Coverage Δ
Rust Core 73.89% <ø> (-1.89%) ⬇️
Java SDK 63.67% <ø> (ø)
C# SDK 71.16% <ø> (-1.13%) ⬇️
Python SDK 88.70% <ø> (ø)
PHP SDK 82.97% <ø> (ø)
Node SDK 96.36% <ø> (+0.08%) ⬆️
Go SDK 69.18% <ø> (ø)
Files with missing lines Coverage Δ
core/common/src/types/message/partitioning.rs 75.18% <ø> (ø)
core/sdk/src/clients/client.rs 89.22% <ø> (ø)

... and 152 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@slbotbm slbotbm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will read more later

Comment thread core/common/src/traits/partitioner.rs Outdated
Comment thread core/common/src/traits/partitioner.rs Outdated
Comment thread core/common/src/traits/partitioner.rs Outdated
Comment thread core/common/src/types/message/partitioning.rs Outdated
Comment thread core/sdk/src/clients/client.rs Outdated
Comment thread core/sdk/src/clients/client.rs Outdated
Comment thread core/sdk/src/clients/client.rs Outdated
Comment thread core/sdk/src/clients/client.rs Outdated
Comment thread core/sdk/src/clients/client.rs Outdated
Comment thread core/sdk/src/clients/client.rs Outdated
@haubur
haubur marked this pull request as ready for review August 8, 2026 08:09
@haubur

haubur commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 8, 2026
@haubur haubur changed the title chore(docs): proposal core/sdk lib.rs and IggyClient docs chore(docs): core/sdk lib.rs and IggyClient docs Aug 8, 2026
@haubur
haubur requested a review from slbotbm August 10, 2026 12:02
Comment thread core/sdk/src/lib.rs
//! **This library is the Apache Iggy SDK.**
//! It exposes a low-level and a high-level API for the Apache Iggy message streaming infrastructure for the Rust programming language.
//! SDKs for other programming languages can be found in [`core/foreign`] of the root repository on GitHub.
//! Note, most of them wrap this SDK. Hence, newer features might be delayed in other languages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line does not seem required here.

Comment thread core/sdk/src/lib.rs
//! The core of the Iggy server is a persisted append-only log data structure.
//! It is concerned with allowing read and writes in the most efficient way.
//! Reading and writing to the server is the domain of this SDK.
//! The server exposes *commands* that can be triggered to change it's state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"that can be triggered to change it's state." -> "that can be triggered to change its state."

Comment thread core/sdk/src/lib.rs
//! The server exposes *commands* that can be triggered to change it's state.
//! These commands allow administrative tasks, such as handling users, permissions and setting up streams and topics
//! or writing and reading messages from the log.
//! A comprehensive overview of commands can be found in the [`schema spec`] on the website or checking the [`server command enum`] within the source code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to also give links here. "schema spec" and "server command enum" do not help the reader understand where the information is located.

Comment thread core/sdk/src/lib.rs
Comment on lines +40 to +41
//! speak the wire protocol directly and that the high-level API is built on top of.
//! Start with the high-level API unless you have a specific reason not to.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Start with the high-level API unless you have a specific reason not to." -> "It is recommended to start with the high-level API, and utilize the low level API in case the high-level API cannot satisfy your requirements.

Comment thread core/sdk/src/lib.rs
Comment on lines +47 to +48
//! Clients provided by the high-level API already provide common message-streaming features, that
//! you would otherwise need to build yourself.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"common message-streaming features, that" -> "common message-streaming features that"

Comment thread core/sdk/src/lib.rs
Comment on lines +103 to +104
//! - **Auto-join** of consumer groups, assignment refresh and reconnection
//! handling, and payload **decryption**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrasing this would be better, difficult to understand.

Comment thread core/sdk/src/lib.rs
Comment on lines +108 to +110
//! The stream builder API is a convenient way to use the high-level API.
//! [`IggyStream`], [`IggyStreamProducer`], and
//! [`IggyStreamConsumer`] are construct everything at once.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not understand what you're trying to convey here.

Comment thread core/sdk/src/lib.rs
Comment on lines +127 to +128
//! construction, drop down to [`IggyClient::producer`] and
//! [`IggyClient::consumer`] and configure the builders directly. The stream

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"drop down to [IggyClient::producer] and [IggyClient::consumer] and configure the builders directly" -> "the usage of [IggyClient::producer] and [IggyClient::consumer] is recommended"

Comment thread core/sdk/src/lib.rs
Comment on lines +129 to +130
//! builder offers nothing the high-level API cannot, since it is built entirely
//! on top of it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to replace this negative sentence with a positive one

Comment thread core/sdk/src/lib.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a lot of repetition of stuff here. Would be better to dedupe.

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author PR is waiting on author response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend Rust SDK Docs: lib.rs and high-level API

2 participants