This is an automated email from the ASF dual-hosted git repository.

hgruszecki 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 4ca83c42 chore(repo): reorganize examples directory structure (#1888)
4ca83c42 is described below

commit 4ca83c42249c49c7bd8ebd45c3d19a8ccc3116f4
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Sat Jun 21 13:05:13 2025 +0200

    chore(repo): reorganize examples directory structure (#1888)
---
 .github/workflows/ci-test-rust.yml                             |  2 +-
 Cargo.toml                                                     |  2 +-
 README.md                                                      |  4 ++--
 core/connectors/README.md                                      |  2 +-
 {core/examples => examples/rust}/Cargo.toml                    |  0
 {core/examples => examples/rust}/README.md                     |  6 +++---
 {core/examples => examples/rust}/src/basic/consumer/main.rs    |  0
 {core/examples => examples/rust}/src/basic/producer/main.rs    |  0
 .../rust}/src/getting-started/consumer/main.rs                 |  0
 .../rust}/src/getting-started/producer/main.rs                 |  0
 {core/examples => examples/rust}/src/lib.rs                    |  0
 .../rust}/src/message-envelope/consumer/main.rs                |  0
 .../rust}/src/message-envelope/producer/main.rs                |  0
 .../rust}/src/message-headers/consumer/main.rs                 |  0
 .../rust}/src/message-headers/producer/main.rs                 |  0
 .../rust}/src/multi-tenant/consumer/main.rs                    |  0
 .../rust}/src/multi-tenant/producer/main.rs                    |  0
 {core/examples => examples/rust}/src/new-sdk/consumer/main.rs  |  0
 {core/examples => examples/rust}/src/new-sdk/producer/main.rs  |  0
 {core/examples => examples/rust}/src/shared/args.rs            |  0
 {core/examples => examples/rust}/src/shared/client.rs          |  0
 {core/examples => examples/rust}/src/shared/messages.rs        |  0
 .../rust}/src/shared/messages_generator.rs                     |  0
 {core/examples => examples/rust}/src/shared/mod.rs             |  0
 {core/examples => examples/rust}/src/shared/stream.rs          |  0
 {core/examples => examples/rust}/src/shared/system.rs          |  0
 .../rust}/src/sink-data-producer/docker-compose.yml            |  0
 .../examples => examples/rust}/src/sink-data-producer/main.rs  |  0
 .../rust}/src/stream-builder/stream-basic/main.rs              |  0
 .../rust}/src/stream-builder/stream-consumer-config/main.rs    |  0
 .../rust}/src/stream-builder/stream-consumer/main.rs           |  0
 .../rust}/src/stream-builder/stream-producer-config/main.rs    |  0
 .../rust}/src/stream-builder/stream-producer/main.rs           |  0
 ...xamples-from-readme.sh => run-rust-examples-from-readme.sh} | 10 +++++-----
 34 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/ci-test-rust.yml 
b/.github/workflows/ci-test-rust.yml
index 5cfbd57b..1b1c7b1c 100644
--- a/.github/workflows/ci-test-rust.yml
+++ b/.github/workflows/ci-test-rust.yml
@@ -71,7 +71,7 @@ jobs:
       - name: Run tests ${{ matrix.target }}
         run: cargo test ${{ env.VERBOSE_FLAG }} --target ${{ matrix.target }}
       - name: Check CLI examples from README
-        run: ./scripts/run-examples-from-readme.sh
+        run: ./scripts/run-rust-examples-from-readme.sh
       - name: Check if workspace is clean
         run: git status --porcelain
 
diff --git a/Cargo.toml b/Cargo.toml
index f785c1da..0bda2c80 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -36,11 +36,11 @@ members = [
     "core/connectors/sinks/quickwit_sink",
     "core/connectors/sinks/stdout_sink",
     "core/connectors/sources/random_source",
-    "core/examples",
     "core/integration",
     "core/sdk",
     "core/server",
     "core/tools",
+    "examples/rust",
 ]
 resolver = "2"
 
diff --git a/README.md b/README.md
index 5981bc68..cda6f5d8 100644
--- a/README.md
+++ b/README.md
@@ -225,9 +225,9 @@ To see the detailed logs from the CLI/server, run it with 
`RUST_LOG=trace` envir
 
 ## Examples
 
-You can find comprehensive sample applications under the `core/examples` 
directory. These examples showcase various usage patterns of the Iggy client 
SDK, from basic operations to advanced multi-tenant scenarios.
+You can find comprehensive sample applications under the `examples/rust` 
directory. These examples showcase various usage patterns of the Iggy client 
SDK, from basic operations to advanced multi-tenant scenarios.
 
-For detailed information about available examples and how to run them, please 
see the [Examples README](core/examples/README.md).
+For detailed information about available examples and how to run them, please 
see the [Examples README](examples/rust/README.md).
 
 ---
 
diff --git a/core/connectors/README.md b/core/connectors/README.md
index f3784bb3..f7dd95dc 100644
--- a/core/connectors/README.md
+++ b/core/connectors/README.md
@@ -19,7 +19,7 @@ The highly performant and modular runtime for statically 
typed, yet dynamically
 
 1. Build the project in release mode, and make sure that the plugins specified 
in `core/connectors/config.toml` under `path` are available. You can use either 
of `toml`, `json` or `yaml` formats for the configuration file.
 
-2. Run `docker compose up -d` from `/core/examples/sink-data-producer` which 
will start the Quickwit server to be used by an example sink connector. At this 
point, you can access the Quickwit UI at 
[http://localhost:7280](http://localhost:7280) - check this dashboard again 
later on, after the `events` index will be created.
+2. Run `docker compose up -d` from `/examples/rust/src/sink-data-producer` 
which will start the Quickwit server to be used by an example sink connector. 
At this point, you can access the Quickwit UI at 
[http://localhost:7280](http://localhost:7280) - check this dashboard again 
later on, after the `events` index will be created.
 
 3. Set environment variable 
`IGGY_CONNECTORS_RUNTIME_CONFIG_PATH=core/connectors/runtime/config` (adjust 
the path as needed) pointing to the runtime configuration file.
 
diff --git a/core/examples/Cargo.toml b/examples/rust/Cargo.toml
similarity index 100%
rename from core/examples/Cargo.toml
rename to examples/rust/Cargo.toml
diff --git a/core/examples/README.md b/examples/rust/README.md
similarity index 93%
rename from core/examples/README.md
rename to examples/rust/README.md
index cc74d596..50f93213 100644
--- a/core/examples/README.md
+++ b/examples/rust/README.md
@@ -6,7 +6,7 @@ This directory contains comprehensive sample applications that 
showcase various
 
 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`.
 
-You can run multiple producers and consumers simultaneously to observe how 
messages are distributed across clients. Most examples support configurable 
options via the 
[Args](https://github.com/apache/iggy/blob/master/core/examples/src/shared/args.rs)
 struct, including transport protocol, stream/topic/partition settings, 
consumer ID, message size, and more.
+You can run multiple producers and consumers simultaneously to observe how 
messages are distributed across clients. Most examples support configurable 
options via the 
[Args](https://github.com/apache/iggy/blob/master/examples/rust/src/shared/args.rs)
 struct, including transport protocol, stream/topic/partition settings, 
consumer ID, message size, and more.
 
 ![sample](../../assets/sample.png)
 
@@ -123,11 +123,11 @@ All examples can be executed directly from the 
repository. Follow these steps:
 2. **Run desired example**: `cargo run --example EXAMPLE_NAME`
 3. **Check source code**: Examples include detailed comments explaining 
concepts and usage patterns
 
-Most examples use shared utilities from `core/examples/src/shared/` including:
+Most examples use shared utilities from `examples/rust/src/shared/` including:
 
 - Message type definitions (orders, events)
 - Message generation utilities
 - Common argument parsing
 - Client setup helpers
 
-The examples are automatically tested via 
`scripts/run-examples-from-readme.sh` to ensure they remain functional and 
up-to-date with the latest API changes.
+The examples are automatically tested via 
`scripts/run-rust-examples-from-readme.sh` to ensure they remain functional and 
up-to-date with the latest API changes.
diff --git a/core/examples/src/basic/consumer/main.rs 
b/examples/rust/src/basic/consumer/main.rs
similarity index 100%
rename from core/examples/src/basic/consumer/main.rs
rename to examples/rust/src/basic/consumer/main.rs
diff --git a/core/examples/src/basic/producer/main.rs 
b/examples/rust/src/basic/producer/main.rs
similarity index 100%
rename from core/examples/src/basic/producer/main.rs
rename to examples/rust/src/basic/producer/main.rs
diff --git a/core/examples/src/getting-started/consumer/main.rs 
b/examples/rust/src/getting-started/consumer/main.rs
similarity index 100%
rename from core/examples/src/getting-started/consumer/main.rs
rename to examples/rust/src/getting-started/consumer/main.rs
diff --git a/core/examples/src/getting-started/producer/main.rs 
b/examples/rust/src/getting-started/producer/main.rs
similarity index 100%
rename from core/examples/src/getting-started/producer/main.rs
rename to examples/rust/src/getting-started/producer/main.rs
diff --git a/core/examples/src/lib.rs b/examples/rust/src/lib.rs
similarity index 100%
rename from core/examples/src/lib.rs
rename to examples/rust/src/lib.rs
diff --git a/core/examples/src/message-envelope/consumer/main.rs 
b/examples/rust/src/message-envelope/consumer/main.rs
similarity index 100%
rename from core/examples/src/message-envelope/consumer/main.rs
rename to examples/rust/src/message-envelope/consumer/main.rs
diff --git a/core/examples/src/message-envelope/producer/main.rs 
b/examples/rust/src/message-envelope/producer/main.rs
similarity index 100%
rename from core/examples/src/message-envelope/producer/main.rs
rename to examples/rust/src/message-envelope/producer/main.rs
diff --git a/core/examples/src/message-headers/consumer/main.rs 
b/examples/rust/src/message-headers/consumer/main.rs
similarity index 100%
rename from core/examples/src/message-headers/consumer/main.rs
rename to examples/rust/src/message-headers/consumer/main.rs
diff --git a/core/examples/src/message-headers/producer/main.rs 
b/examples/rust/src/message-headers/producer/main.rs
similarity index 100%
rename from core/examples/src/message-headers/producer/main.rs
rename to examples/rust/src/message-headers/producer/main.rs
diff --git a/core/examples/src/multi-tenant/consumer/main.rs 
b/examples/rust/src/multi-tenant/consumer/main.rs
similarity index 100%
rename from core/examples/src/multi-tenant/consumer/main.rs
rename to examples/rust/src/multi-tenant/consumer/main.rs
diff --git a/core/examples/src/multi-tenant/producer/main.rs 
b/examples/rust/src/multi-tenant/producer/main.rs
similarity index 100%
rename from core/examples/src/multi-tenant/producer/main.rs
rename to examples/rust/src/multi-tenant/producer/main.rs
diff --git a/core/examples/src/new-sdk/consumer/main.rs 
b/examples/rust/src/new-sdk/consumer/main.rs
similarity index 100%
rename from core/examples/src/new-sdk/consumer/main.rs
rename to examples/rust/src/new-sdk/consumer/main.rs
diff --git a/core/examples/src/new-sdk/producer/main.rs 
b/examples/rust/src/new-sdk/producer/main.rs
similarity index 100%
rename from core/examples/src/new-sdk/producer/main.rs
rename to examples/rust/src/new-sdk/producer/main.rs
diff --git a/core/examples/src/shared/args.rs b/examples/rust/src/shared/args.rs
similarity index 100%
rename from core/examples/src/shared/args.rs
rename to examples/rust/src/shared/args.rs
diff --git a/core/examples/src/shared/client.rs 
b/examples/rust/src/shared/client.rs
similarity index 100%
rename from core/examples/src/shared/client.rs
rename to examples/rust/src/shared/client.rs
diff --git a/core/examples/src/shared/messages.rs 
b/examples/rust/src/shared/messages.rs
similarity index 100%
rename from core/examples/src/shared/messages.rs
rename to examples/rust/src/shared/messages.rs
diff --git a/core/examples/src/shared/messages_generator.rs 
b/examples/rust/src/shared/messages_generator.rs
similarity index 100%
rename from core/examples/src/shared/messages_generator.rs
rename to examples/rust/src/shared/messages_generator.rs
diff --git a/core/examples/src/shared/mod.rs b/examples/rust/src/shared/mod.rs
similarity index 100%
rename from core/examples/src/shared/mod.rs
rename to examples/rust/src/shared/mod.rs
diff --git a/core/examples/src/shared/stream.rs 
b/examples/rust/src/shared/stream.rs
similarity index 100%
rename from core/examples/src/shared/stream.rs
rename to examples/rust/src/shared/stream.rs
diff --git a/core/examples/src/shared/system.rs 
b/examples/rust/src/shared/system.rs
similarity index 100%
rename from core/examples/src/shared/system.rs
rename to examples/rust/src/shared/system.rs
diff --git a/core/examples/src/sink-data-producer/docker-compose.yml 
b/examples/rust/src/sink-data-producer/docker-compose.yml
similarity index 100%
rename from core/examples/src/sink-data-producer/docker-compose.yml
rename to examples/rust/src/sink-data-producer/docker-compose.yml
diff --git a/core/examples/src/sink-data-producer/main.rs 
b/examples/rust/src/sink-data-producer/main.rs
similarity index 100%
rename from core/examples/src/sink-data-producer/main.rs
rename to examples/rust/src/sink-data-producer/main.rs
diff --git a/core/examples/src/stream-builder/stream-basic/main.rs 
b/examples/rust/src/stream-builder/stream-basic/main.rs
similarity index 100%
rename from core/examples/src/stream-builder/stream-basic/main.rs
rename to examples/rust/src/stream-builder/stream-basic/main.rs
diff --git a/core/examples/src/stream-builder/stream-consumer-config/main.rs 
b/examples/rust/src/stream-builder/stream-consumer-config/main.rs
similarity index 100%
rename from core/examples/src/stream-builder/stream-consumer-config/main.rs
rename to examples/rust/src/stream-builder/stream-consumer-config/main.rs
diff --git a/core/examples/src/stream-builder/stream-consumer/main.rs 
b/examples/rust/src/stream-builder/stream-consumer/main.rs
similarity index 100%
rename from core/examples/src/stream-builder/stream-consumer/main.rs
rename to examples/rust/src/stream-builder/stream-consumer/main.rs
diff --git a/core/examples/src/stream-builder/stream-producer-config/main.rs 
b/examples/rust/src/stream-builder/stream-producer-config/main.rs
similarity index 100%
rename from core/examples/src/stream-builder/stream-producer-config/main.rs
rename to examples/rust/src/stream-builder/stream-producer-config/main.rs
diff --git a/core/examples/src/stream-builder/stream-producer/main.rs 
b/examples/rust/src/stream-builder/stream-producer/main.rs
similarity index 100%
rename from core/examples/src/stream-builder/stream-producer/main.rs
rename to examples/rust/src/stream-builder/stream-producer/main.rs
diff --git a/scripts/run-examples-from-readme.sh 
b/scripts/run-rust-examples-from-readme.sh
similarity index 93%
rename from scripts/run-examples-from-readme.sh
rename to scripts/run-rust-examples-from-readme.sh
index c4a9dac8..ae636b06 100755
--- a/scripts/run-examples-from-readme.sh
+++ b/scripts/run-rust-examples-from-readme.sh
@@ -19,10 +19,10 @@
 
 set -euo pipefail
 
-# Script to run examples from README.md and core/examples/README.md files
-# Usage: ./scripts/run-examples-from-readme.sh
+# Script to run Rust examples from README.md and examples/rust/README.md files
+# Usage: ./scripts/run-rust-examples-from-readme.sh
 #
-# This script will run all the commands from both README.md and 
core/examples/README.md files 
+# This script will run all the commands from both README.md and 
examples/rust/README.md files 
 # and check if they pass or fail.
 # If any command fails, it will print the command and exit with non-zero 
status.
 # If all commands pass, it will remove the log file and exit with zero status.
@@ -88,8 +88,8 @@ while IFS= read -r command; do
 
 done < <(grep -E "^\`cargo r --bin iggy -- " README.md)
 
-# Execute all example commands from README.md and core/examples/README.md and 
check if they pass or fail
-for readme_file in README.md core/examples/README.md; do
+# Execute all example commands from README.md and examples/rust/README.md and 
check if they pass or fail
+for readme_file in README.md examples/rust/README.md; do
     if [ ! -f "${readme_file}" ]; then
         continue
     fi

Reply via email to