This is an automated email from the ASF dual-hosted git repository.
piotr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new 38e433975 chore(docs): improve Rust examples documentation (#2440)
38e433975 is described below
commit 38e4339756c038887cab04c33cc139286a4df8fa
Author: Rimuksh Kansal <[email protected]>
AuthorDate: Thu Dec 4 21:12:27 2025 +0900
chore(docs): improve Rust examples documentation (#2440)
---
examples/rust/README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/examples/rust/README.md b/examples/rust/README.md
index 986f4c172..c406c30a4 100644
--- a/examples/rust/README.md
+++ b/examples/rust/README.md
@@ -4,7 +4,50 @@ This directory contains comprehensive sample applications that
showcase various
## Running Examples
-To run any example, first start the server with `cargo run --bin iggy-server`
and then run the desired example using `cargo run --example EXAMPLE_NAME`.
+Iggy requires valid credentials to authenticate client requests. The examples
assume that the server is using the default root credentials, which can be
enabled in one of two ways:
+
+1. Start the server with default credentials:
+
+ ```bash
+ cargo run --bin iggy-server -- --with-default-root-credentials
+ ```
+
+2. Set the appropriate environment variables before starting the server with
`cargo run --bin iggy-server`:
+
+ macOS/Linux:
+
+ ```bash
+ export IGGY_ROOT_USERNAME=iggy
+ export IGGY_ROOT_PASSWORD=iggy
+ ```
+
+ Windows(Powershell):
+
+ ```bash
+ $env:IGGY_ROOT_USERNAME = "iggy"
+ $env:IGGY_ROOT_PASSWORD = "iggy"
+ ```
+
+> **Note** <br>
+> This setup is intended only for development and testing, not production use.
+
+By default, all server data is stored in the `local_data` directory (this can
be changed via `system.path` in `server.toml`).
+
+Root credentials are applied **only on the very first startup**, when no data
directory exists yet.
+Once the server has created and populated the data directory, the existing
stored credentials will always be used, and supplying the
`--with-default-root-credentials` flag or setting the environment variables
will no longer override them.
+
+If the server has already been started once and your example returns `Error:
InvalidCredentials`, then this means the stored credentials differ from the
defaults.
+
+You can reset the credentials in one of two ways:
+
+1. Delete the existing data directory, then start the server again with the
default-credential flag or environment variables.
+2. Use the `--fresh` flag to force a reset:
+
+ ```bash
+ cargo run --bin iggy-server -- --with-default-root-credentials --fresh
+ ```
+
+ This will ignore any existing data directory and re-initialize it with the
default credentials.
For server configuration options and help: