Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/docs/apis/client-support-matrix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Client Support Matrix"
sidebar_position: 4
sidebar_position: 5
---

# Client Feature Support Matrix
Expand Down
70 changes: 70 additions & 0 deletions website/docs/apis/cpp-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: "C++ Client"
sidebar_position: 4
---

# Fluss C++ Client

The Fluss C++ Client provides a high-performance, synchronous interface for
interacting with Fluss clusters. It manages an internal Tokio runtime and
supports Apache Arrow for efficient data interchange.

The client provides two main APIs:

- **[Admin API](https://clients.fluss.apache.org/user-guide/cpp/api-reference#admin)**: For managing databases, tables, and partitions.
- **[Table API](https://clients.fluss.apache.org/user-guide/cpp/api-reference#table)**: For reading and writing to Log and Primary Key tables.

## Installation

The C++ client is not yet published as a package and must be built from source.

**Prerequisites:** CMake 3.22+, C++17 compiler, Rust 1.85+, Apache Arrow C++ library
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.

C++ build from source is slightly more involved with dependencies installation needed as well. Can we either add steps to install those and / or link to main doc e.g. see also steps to install pre-requisites

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added the dependency installation steps for macOS and Ubuntu/Debian, and linked to the full installation guide for advanced options like CMake FetchContent integration. PTAL!


Install dependencies:
```bash
# macOS
brew install cmake arrow

# Ubuntu/Debian
sudo apt-get install cmake libarrow-dev
```
```bash
git clone https://github.com/apache/fluss-rust.git
cd fluss-rust/bindings/cpp
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
```

For full build options including CMake integration into your own project, see the
[C++ client installation guide](https://clients.fluss.apache.org/user-guide/cpp/installation).

## Quick Example
```cpp
#include "fluss.hpp"

int main() {
fluss::Configuration config;
config.bootstrap_servers = "127.0.0.1:9123";

fluss::Connection conn;
fluss::Result result = fluss::Connection::Create(config, conn);
if (!result.Ok()) {
std::cerr << "Connection failed: " << result.error_message << std::endl;
return 1;
}

fluss::Admin admin;
conn.GetAdmin(admin);

return 0;
}
```

For more examples, see the [Fluss C++ Client documentation](https://clients.fluss.apache.org/user-guide/cpp/example/).

## Full Documentation

For the complete C++ client reference including all configuration options,
API methods, data types, error handling, and worked examples — see the
**[Fluss C++ Client documentation](https://clients.fluss.apache.org/user-guide/cpp/installation)**.