Skip to content

Commit 16ae846

Browse files
committed
Document library naming and migration paths
Add a Linking section to getting-started.md covering: - New users: how to link with -lscylladb / pkg-config - Upgrading from CPP RS Driver 1.x: name mapping table - Migrating from ScyllaDB CPP Driver (C++ fork) - Migrating from DataStax CPP Driver Also clarify the package-vs-library name discrepancy (package is scylla-cpp-driver, library is libscylladb).
1 parent 1e3536a commit 16ae846

1 file changed

Lines changed: 77 additions & 13 deletions

File tree

docs/source/topics/getting-started.md

Lines changed: 77 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ Packages are available for some platforms - see the [Installation section](insta
2727

2828
They are available for download from the [Releases][cpp-rs-driver-releases] section.
2929

30-
NOTE: If you have Datastax or ScyllaDB C/C++ Driver installed, you need to remove it first:
31-
32-
```bash
33-
# Ubuntu/Debian:
34-
sudo apt remove cassandra-cpp-driver
35-
sudo apt remove scylla-cpp-driver
36-
37-
38-
# Rocky/RedHat:
39-
sudo dnf remove cassandra-cpp-driver
40-
sudo dnf remove scylla-cpp-driver
41-
```
42-
4330
```bash
4431
# Example: Ubuntu/Debian:
4532
wget https://github.com/scylladb/cpp-rs-driver/releases/download/<LATEST_VERSION>/scylla_cpp_driver_<LATEST_VERSION>_amd64.deb \
@@ -54,6 +41,83 @@ wget https://github.com/scylladb/cpp-rs-driver/releases/download/<LATEST_VERSION
5441
sudo dnf install -y ./scylla_cpp_driver_<LATEST_VERSION>_x86_64.rpm ./scylla_cpp_driver-devel_<LATEST_VERSION>_x86_64.rpm
5542
```
5643

44+
NOTE: The package is named `scylla-cpp-driver` while the library file is
45+
`libscylladb`. This is intentional — the package name reflects the project,
46+
while the library name follows the convention established by `libcassandra`.
47+
48+
## Linking
49+
50+
### New users
51+
52+
Link with `-lscylladb`, or use pkg-config:
53+
54+
```bash
55+
pkg-config --cflags --libs scylladb # shared
56+
pkg-config --cflags --libs scylladb_static # static
57+
```
58+
59+
CMake example using pkg-config:
60+
61+
```cmake
62+
find_package(PkgConfig REQUIRED)
63+
pkg_check_modules(SCYLLADB REQUIRED IMPORTED_TARGET scylladb)
64+
target_link_libraries(my_app PRIVATE PkgConfig::SCYLLADB)
65+
```
66+
67+
### Upgrading from CPP RS Driver 1.0.x
68+
69+
The library was renamed from `libscylla-cpp-driver` to `libscylladb` in
70+
version 1.1.0. Update your build system accordingly:
71+
72+
| What | Old | New |
73+
|-----------------------|----------------------------------|------------------------|
74+
| Shared library | `libscylla-cpp-driver.so` | `libscylladb.so` |
75+
| Static library | `libscylla-cpp-driver_static.a` | `libscylladb_static.a` |
76+
| Linker flag (shared) | `-lscylla-cpp-driver` | `-lscylladb` |
77+
| Linker flag (static) | `-lscylla-cpp-driver_static` | `-lscylladb_static` |
78+
| pkg-config module | `scylla-cpp-driver` | `scylladb` |
79+
| pkg-config (static) | `scylla-cpp-driver_static` | `scylladb_static` |
80+
| SONAME | `libscylla-cpp-driver.so.1` | `libscylladb.so.1` |
81+
82+
Package names (DEB/RPM) remain `scylla-cpp-driver` / `scylla-cpp-driver-dev`.
83+
84+
### Migrating from ScyllaDB CPP Driver (C++ fork)
85+
86+
The ScyllaDB CPP Driver produced `libscylla-cpp-driver.so` (with a
87+
`libcassandra.so` symlink). The CPP RS Driver replaces it with
88+
`libscylladb.so`. A `libcassandra` compatibility symlink is installed by
89+
default, so builds using `-lcassandra` will continue to work. For new
90+
integrations, prefer `-lscylladb`.
91+
92+
Remove the old driver before installing:
93+
94+
```bash
95+
# Ubuntu/Debian:
96+
sudo apt remove scylla-cpp-driver
97+
98+
# Rocky/RedHat:
99+
sudo dnf remove scylla-cpp-driver
100+
```
101+
102+
### Migrating from DataStax CPP Driver
103+
104+
The DataStax driver produced `libcassandra.so`. The CPP RS Driver installs
105+
a `libcassandra` compatibility symlink and a `cassandra.pc` pkg-config
106+
file, so existing build systems using `-lcassandra` or
107+
`pkg-config cassandra` will work without changes.
108+
109+
For new integrations, prefer `-lscylladb` / `pkg-config scylladb`.
110+
111+
Remove the old driver before installing:
112+
113+
```bash
114+
# Ubuntu/Debian:
115+
sudo apt remove cassandra-cpp-driver
116+
117+
# Rocky/RedHat:
118+
sudo dnf remove cassandra-cpp-driver
119+
```
120+
57121
## Connecting
58122

59123
```c

0 commit comments

Comments
 (0)