Skip to content

Rename lib to scylladb#472

Merged
wprzytula merged 4 commits into
scylladb:masterfrom
wprzytula:rename-lib-to-scylladb
Jun 8, 2026
Merged

Rename lib to scylladb#472
wprzytula merged 4 commits into
scylladb:masterfrom
wprzytula:rename-lib-to-scylladb

Conversation

@wprzytula

@wprzytula wprzytula commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Fixes: #464

Summary

Rename the library artifact from libscylla-cpp-driver to libscylladb, eliminating both hyphens and underscores from the name. This fixes the Windows DLL naming mismatch (#452) where the import library internally referenced Cargo's underscore output (scylla_cpp_driver.dll) while the installed file used hyphens (scylla-cpp-driver.dll), causing "dll not found" errors at runtime.

The new name scylladb is consistent with the original DataStax driver's convention (cassandra) and works cleanly across all platforms.

Commits

  1. Rename library from scylla-cpp-driver to scylladb
    Core rename: Cargo.toml [lib] name, all CMake naming (INSTALL_NAME variables, SONAME, targets), pkg-config files (now scylladb.pc / scylladb_static.pc), CI workflow, and Makefiles. Package names (DEB/RPM) intentionally remain scylla-cpp-driver.

  2. Add cassandra compatibility symlinks
    Install libcassandra.so -> libscylladb.so, libcassandra_static.a -> libscylladb_static.a, and a cassandra.pc pkg-config file. Controlled by CASS_INSTALL_CASSANDRA_COMPAT (ON by default). This eases migration from the DataStax CPP Driver where users link with -lcassandra.

  3. smoke-test: Remove all dev artifacts in DMG cleanup
    The remove-driver-dev-dmg target was missing removal of scylladb_static.pc and libscylladb_static.a, which could leave stale files under /usr/local between smoke-test runs.

  4. Document library naming and migration paths
    Add a "Linking" section to getting-started.md covering new users, upgraders from CPP RS 1.0.x, migrators from ScyllaDB CPP Driver, and migrators from DataStax CPP Driver. Includes a mapping table of old vs. new names and a note explaining the package-vs-library name discrepancy.

Migration impact

  • API/ABI: Unchanged. Only the library filename and pkg-config module name change.
  • Build systems: Users must update linker flags (-lscylladb instead of -lscylla-cpp-driver) and pkg-config invocations.
  • DataStax migrators: No action needed thanks to libcassandra symlinks.
  • Package names: Unchanged (scylla-cpp-driver, scylla-cpp-driver-dev).

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have implemented Rust unit tests for the features/changes introduced.
  • [ ] I have enabled appropriate tests in Makefile in {SCYLLA,CASSANDRA}_(NO_VALGRIND_)TEST_FILTER.
  • I added appropriate Fixes: annotations to PR description.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR systematically renames the C++ driver library from scylla-cpp-driver to scylladb throughout the codebase. Changes span CMake targets (scylladb/scylladb_static), Rust crate naming, platform-specific build configuration (macOS install_name, Linux SONAME, Windows DLL handling), pkg-config module definitions (including a new cassandra compatibility template), test infrastructure (GitHub workflows, smoke tests, Makefile targets), and user documentation with migration guidance. Test imports were updated to reference the new FFI/module paths.

Possibly related PRs

  • scylladb/cpp-rs-driver#471: Related adjustments in Rust test/import code that align with the crate/module path changes introduced here.

Possibly related issues

  • Mess and legacies in library naming #464: Related refactoring using the same library renaming from scylla-cpp-driver to scylladb across CMake targets, pkg-config names, crate naming, and platform-specific handling.

Suggested labels

documentation

Suggested reviewers

  • Lorak-mmk
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly summarizes the main change: renaming the library artifact from scylla-cpp-driver to scylladb.
Linked Issues check ✅ Passed All coding requirements from #464 are met: library name changed to scylladb, SONAME updated, build-system rename steps removed, cassandra compatibility symlinks added, and documentation provided.
Out of Scope Changes check ✅ Passed All changes directly support the library rename objective. No unrelated modifications to unrelated functionality or files outside the scope of #464 requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description check ✅ Passed The PR description comprehensively addresses the template requirements with logically split commits, clear commit messages, a detailed summary, and appropriate Fixes annotations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@wprzytula wprzytula requested review from Lorak-mmk and Copilot June 3, 2026 14:15
@wprzytula wprzytula self-assigned this Jun 3, 2026
@wprzytula wprzytula marked this pull request as ready for review June 3, 2026 14:15
@wprzytula wprzytula added this to the 1.1.0 milestone Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":500,"request":{"method":"PATCH","url":"https://api.github.com/repos/scylladb/cpp-rs-driver/issues/comments/4612678242","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- review_stack_entry_start -->\n\n[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/scylladb/cpp-rs-driver/pull/472?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)\n\n<!-- review_stack_entry_end -->\n<!-- This is an auto-generated comment: review in progress by coderabbit.ai -->\n\n> [!NOTE]\n> Currently processing new changes in this PR. This may take a few minutes, please wait...\n> \n> <details>\n> <summary>⚙️ Run configuration</summary>\n> \n> **Configuration used**: Organization UI\n> \n> **Review profile**: CHILL\n> \n> **Plan**: Pro Plus\n> \n> **Run ID**: `ef252f98-707b-43b5-8f5c-f774ae136819`\n> \n> </details>\n> \n> <details>\n> <summary>📥 Commits</summary>\n> \n> Reviewing files that changed from the base of the PR and between 7c17c04a53e9fa607cb8dc25842705d2004b6b63 and 16ae846569ff2c00e70a189417190079cf9cd0da.\n> \n> </details>\n> \n> <details>\n> <summary>📒 Files selected for processing (12)</summary>\n> \n> * `.github/workflows/build-lint-and-test.yml`\n> * `CMakeLists.txt`\n> * `Makefile`\n> * `cmake/CMakeCargo.cmake`\n> * `docs/source/topics/getting-started.md`\n> * `packaging/smoke-test-app/CMakeLists.txt`\n> * `packaging/smoke-test-app/Makefile`\n> * `scylla-rust-wrapper/CMakeLists.txt`\n> * `scylla-rust-wrapper/Cargo.toml`\n> * `scylla-rust-wrapper/cassandra.pc.in`\n> * `scylla-rust-wrapper/scylladb.pc.in`\n> * `scylla-rust-wrapper/scylladb_static.pc.in`\n> \n> </details>\n> \n> \n\n<!-- end of auto-generated comment: review in progress by coderabbit.ai -->\n\n<!-- tips_start -->\n\n---\n\n\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->"},"request":{"retryCount":3,"signal":{},"retries":3,"retryAfter":16}}}

@coderabbitai coderabbitai Bot added area/testing Related to unit/integration testing area/Driver_-_cpp-rs-driver labels Jun 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR renames the driver’s built library artifact to scylladb (avoiding both hyphens and underscores) to resolve cross-platform naming issues—especially the Windows DLL/import-lib mismatch—and introduces optional cassandra-compat installation artifacts to ease migration for existing users.

Changes:

  • Renames the Rust [lib] output and updates CMake/install logic, pkg-config metadata, and build scripts to use scylladb / scylladb_static.
  • Adds optional cassandra compatibility artifacts (symlinks + cassandra.pc) controlled by CASS_INSTALL_CASSANDRA_COMPAT (default ON).
  • Updates documentation and packaging/smoke-test infrastructure to reflect new linking/module names.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scylla-rust-wrapper/scylladb.pc.in Updates shared pkg-config metadata to link with -lscylladb.
scylla-rust-wrapper/scylladb_static.pc.in Updates static pkg-config metadata to link with -lscylladb_static.
scylla-rust-wrapper/CMakeLists.txt Renames installed artifacts/targets, adjusts Windows handling, and adds optional cassandra-compat symlink/pkg-config install logic.
scylla-rust-wrapper/cassandra.pc.in Adds cassandra pkg-config file for compatibility migrations.
scylla-rust-wrapper/Cargo.toml Renames Rust library output to scylladb.
packaging/smoke-test-app/Makefile Updates smoke-test package verification/removal paths for new artifact names.
packaging/smoke-test-app/CMakeLists.txt Switches smoke-test build to consume scylladb pkg-config modules.
Makefile Updates package smoke-test lookup patterns to find scylladb artifacts.
docs/source/topics/getting-started.md Documents new linking names and migration guidance for existing users.
CMakeLists.txt Adds CASS_INSTALL_CASSANDRA_COMPAT option and switches core target selection to scylladb(_static).
cmake/CMakeCargo.cmake Updates diagrams/comments to reflect the new scylladb naming.
.github/workflows/build-lint-and-test.yml Updates cached integration-test artifact patterns for renamed library files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build-lint-and-test.yml
Comment thread docs/source/topics/getting-started.md
Comment thread scylla-rust-wrapper/CMakeLists.txt Outdated
Comment thread packaging/smoke-test-app/Makefile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build-lint-and-test.yml:
- Around line 13-17: The workflow env block has two list-like entries
("build/cassandra-integration-tests" and "build/libscylladb.*") accidentally
placed where keys belong, breaking YAML and leaving INTEGRATION_TEST_BIN
undefined; fix by adding the missing environment key INTEGRATION_TEST_BIN and
set it to the intended path (e.g., INTEGRATION_TEST_BIN:
build/cassandra-integration-tests) and remove or move the stray
"build/libscylladb.*" entry (or place it under a proper key) so that
env.INTEGRATION_TEST_BIN is available for later uses like
INTEGRATION_TEST_BIN_CACHE_KEY and actions/cache/save.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef252f98-707b-43b5-8f5c-f774ae136819

📥 Commits

Reviewing files that changed from the base of the PR and between 7c17c04 and 16ae846.

📒 Files selected for processing (12)
  • .github/workflows/build-lint-and-test.yml
  • CMakeLists.txt
  • Makefile
  • cmake/CMakeCargo.cmake
  • docs/source/topics/getting-started.md
  • packaging/smoke-test-app/CMakeLists.txt
  • packaging/smoke-test-app/Makefile
  • scylla-rust-wrapper/CMakeLists.txt
  • scylla-rust-wrapper/Cargo.toml
  • scylla-rust-wrapper/cassandra.pc.in
  • scylla-rust-wrapper/scylladb.pc.in
  • scylla-rust-wrapper/scylladb_static.pc.in

Comment thread .github/workflows/build-lint-and-test.yml
@wprzytula wprzytula force-pushed the rename-lib-to-scylladb branch 2 times, most recently from 926aa98 to 2a37d5a Compare June 3, 2026 15:17
@coderabbitai coderabbitai Bot added the documentation Improvements or additions to documentation label Jun 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/source/topics/getting-started.md`:
- Line 82: Update the wording around the dev-package names so Debian and RPM are
separated: replace the current sentence that lists "scylla-cpp-driver /
scylla-cpp-driver-dev" with two distro-family examples (Debian/Ubuntu:
scylla-cpp-driver and scylla-cpp-driver-dev; RPM/Fedora/CentOS:
scylla-cpp-driver and scylla-cpp-driver-devel) and ensure the text references
both "-dev" (Debian) and "-devel" (RPM) explicitly to avoid migration confusion;
update any adjacent examples or package lists that still imply a single "-dev"
name so they match the new split.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e5751da9-2e1e-4425-8a87-fa32314368e5

📥 Commits

Reviewing files that changed from the base of the PR and between 926aa98 and 2a37d5a.

📒 Files selected for processing (15)
  • .github/workflows/build-lint-and-test.yml
  • CMakeLists.txt
  • Makefile
  • cmake/CMakeCargo.cmake
  • docs/source/topics/getting-started.md
  • packaging/smoke-test-app/CMakeLists.txt
  • packaging/smoke-test-app/Makefile
  • scylla-rust-wrapper/CMakeLists.txt
  • scylla-rust-wrapper/Cargo.toml
  • scylla-rust-wrapper/cassandra.pc.in
  • scylla-rust-wrapper/scylladb.pc.in
  • scylla-rust-wrapper/scylladb_static.pc.in
  • scylla-rust-wrapper/tests/integration/consistency.rs
  • scylla-rust-wrapper/tests/integration/session.rs
  • scylla-rust-wrapper/tests/integration/utils.rs
✅ Files skipped from review due to trivial changes (2)
  • scylla-rust-wrapper/cassandra.pc.in
  • cmake/CMakeCargo.cmake
🚧 Files skipped from review as they are similar to previous changes (9)
  • .github/workflows/build-lint-and-test.yml
  • scylla-rust-wrapper/scylladb.pc.in
  • packaging/smoke-test-app/Makefile
  • Makefile
  • CMakeLists.txt
  • packaging/smoke-test-app/CMakeLists.txt
  • scylla-rust-wrapper/Cargo.toml
  • scylla-rust-wrapper/scylladb_static.pc.in
  • scylla-rust-wrapper/CMakeLists.txt

| pkg-config (static) | `scylla-cpp-driver_static` | `scylladb_static` |
| SONAME | `libscylla-cpp-driver.so.1` | `libscylladb.so.1` |

Package names (DEB/RPM) remain `scylla-cpp-driver` / `scylla-cpp-driver-dev`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify RPM dev package name to avoid migration confusion.

Line 82 currently implies a single -dev dev-package name across DEB/RPM, but this page also shows RPM using -devel. Please split this by distro family (e.g., Debian -dev, RPM -devel) to keep migration instructions accurate.

🧰 Tools
🪛 LanguageTool

[grammar] ~82-~82: Ensure spelling is correct
Context: ... (DEB/RPM) remain scylla-cpp-driver / scylla-cpp-driver-dev. ### Migrating from ScyllaDB CPP Driver (C++ ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/source/topics/getting-started.md` at line 82, Update the wording around
the dev-package names so Debian and RPM are separated: replace the current
sentence that lists "scylla-cpp-driver / scylla-cpp-driver-dev" with two
distro-family examples (Debian/Ubuntu: scylla-cpp-driver and
scylla-cpp-driver-dev; RPM/Fedora/CentOS: scylla-cpp-driver and
scylla-cpp-driver-devel) and ensure the text references both "-dev" (Debian) and
"-devel" (RPM) explicitly to avoid migration confusion; update any adjacent
examples or package lists that still imply a single "-dev" name so they match
the new split.

wprzytula added 4 commits June 3, 2026 17:41
Change the library artifact name to 'scylladb', avoiding both
hyphens and underscores. This eliminates the need for the
underscore-to-hyphen rename that was causing issues on Windows (scylladb#452).

The Cargo [lib] name is now 'scylladb', producing libscylladb.so,
libscylladb.a, scylladb.dll directly. The SONAME becomes
libscylladb.so.<major>.

The pkg-config module names change accordingly:
  scylla-cpp-driver   -> scylladb
  scylla-cpp-driver_static -> scylladb_static

Package names (DEB/RPM) remain 'scylla-cpp-driver' unchanged.
Add symlinks to ease migration from the Apache CPP Driver:
- libcassandra.so -> libscylladb.so
- libcassandra_static.a -> libscylladb_static.a
- cassandra.pc pkg-config file (links against -lscylladb)

These are installed by default (CASS_INSTALL_CASSANDRA_COMPAT=ON)
and can be disabled if not needed.
The remove-driver-dev-dmg target was missing removal of
scylladb_static.pc and libscylladb_static.a, which could
leave stale files under /usr/local between smoke-test runs.
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).
@wprzytula wprzytula force-pushed the rename-lib-to-scylladb branch from 2a37d5a to c7e037b Compare June 3, 2026 15:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
docs/source/topics/getting-started.md (1)

82-82: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify dev-package naming for DEB vs RPM distributions.

Line 82 states package names remain scylla-cpp-driver / scylla-cpp-driver-dev, but the examples earlier in the document (lines 33, 40) correctly show that Debian uses -dev while RPM uses -devel. This single suffix is ambiguous for RPM users.

Consider rephrasing to: "Package names remain scylla-cpp-driver and scylla-cpp-driver-dev (Debian) or scylla-cpp-driver-devel (RPM)."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/source/topics/getting-started.md` at line 82, The sentence that
currently says package names remain `scylla-cpp-driver` /
`scylla-cpp-driver-dev` is ambiguous for RPM users; update the wording to
explicitly distinguish Debian vs RPM suffixes, e.g. state "Package names remain
`scylla-cpp-driver` and `scylla-cpp-driver-dev` (Debian) or
`scylla-cpp-driver-devel` (RPM)" so the examples using `-dev` and `-devel` are
clearly mapped to their distributions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@docs/source/topics/getting-started.md`:
- Line 82: The sentence that currently says package names remain
`scylla-cpp-driver` / `scylla-cpp-driver-dev` is ambiguous for RPM users; update
the wording to explicitly distinguish Debian vs RPM suffixes, e.g. state
"Package names remain `scylla-cpp-driver` and `scylla-cpp-driver-dev` (Debian)
or `scylla-cpp-driver-devel` (RPM)" so the examples using `-dev` and `-devel`
are clearly mapped to their distributions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6584e739-b339-4781-8bf4-d03e2405786a

📥 Commits

Reviewing files that changed from the base of the PR and between 2a37d5a and c7e037b.

📒 Files selected for processing (16)
  • .github/workflows/build-lint-and-test.yml
  • CMakeLists.txt
  • Makefile
  • cmake/CMakeCargo.cmake
  • docs/source/topics/getting-started.md
  • packaging/smoke-test-app/CMakeLists.txt
  • packaging/smoke-test-app/Makefile
  • scylla-rust-wrapper/CMakeLists.txt
  • scylla-rust-wrapper/Cargo.toml
  • scylla-rust-wrapper/cassandra.pc.in
  • scylla-rust-wrapper/scylladb.pc.in
  • scylla-rust-wrapper/scylladb_static.pc.in
  • scylla-rust-wrapper/src/argconv.rs
  • scylla-rust-wrapper/tests/integration/consistency.rs
  • scylla-rust-wrapper/tests/integration/session.rs
  • scylla-rust-wrapper/tests/integration/utils.rs
✅ Files skipped from review due to trivial changes (6)
  • scylla-rust-wrapper/scylladb_static.pc.in
  • scylla-rust-wrapper/cassandra.pc.in
  • scylla-rust-wrapper/src/argconv.rs
  • cmake/CMakeCargo.cmake
  • scylla-rust-wrapper/tests/integration/consistency.rs
  • scylla-rust-wrapper/tests/integration/utils.rs
🚧 Files skipped from review as they are similar to previous changes (9)
  • scylla-rust-wrapper/scylladb.pc.in
  • packaging/smoke-test-app/Makefile
  • .github/workflows/build-lint-and-test.yml
  • scylla-rust-wrapper/Cargo.toml
  • packaging/smoke-test-app/CMakeLists.txt
  • Makefile
  • CMakeLists.txt
  • scylla-rust-wrapper/tests/integration/session.rs
  • scylla-rust-wrapper/CMakeLists.txt

@Lorak-mmk

Copy link
Copy Markdown
Contributor

CASS_INSTALL_CASSANDRA_COMPAT (ON by default).

Let's put that in release notes as well.

Build systems: Users must update linker flags (-lscylladb instead of -lscylla-cpp-driver) and pkg-config invocations.

This of course needs to be the most visible thing in release notes.

Package names (DEB/RPM) intentionally remain scylla-cpp-driver.

What is the reason for that? Being able to update from previous version?

@Lorak-mmk

Copy link
Copy Markdown
Contributor

Skip redundant DLL copy on Windows
Since Cargo now outputs scylladb.dll (matching the desired install name exactly), the copy/rename step is no longer needed on Windows. Use the Cargo output directly for the imported target, which also avoids any potential DLL name embedding mismatch in the import library.

I thought we had copy step in general, not only on windows. Is thart not the case? And if it is the case, do we still need it?

@Lorak-mmk Lorak-mmk 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.

Looks good. Please answer my questions above before merging.

@wprzytula

Copy link
Copy Markdown
Contributor Author

Package names (DEB/RPM) intentionally remain scylla-cpp-driver.

What is the reason for that? Being able to update from previous version?

This sounds extremely weird to install scylladb package in order to get a driver. scylladb package sounds more like a package containing the server executable.

Also, I wanted to become again in line with DSx driver's naming:

  • package name: cassandra-cpp-driver
  • lib name: cassandra (libcassandra.so)

@wprzytula

Copy link
Copy Markdown
Contributor Author

Skip redundant DLL copy on Windows
Since Cargo now outputs scylladb.dll (matching the desired install name exactly), the copy/rename step is no longer needed on Windows. Use the Cargo output directly for the imported target, which also avoids any potential DLL name embedding mismatch in the import library.

I thought we had copy step in general, not only on windows. Is thart not the case? And if it is the case, do we still need it?

The description you quoted was a leftover. See the updated cover letter (commit 3).

@Lorak-mmk

Copy link
Copy Markdown
Contributor

Commit 3 is smoke-test: Remove all dev artifacts in DMG cleanup. What does it have to do with the rename step?

@wprzytula

Copy link
Copy Markdown
Contributor Author

Commit 3 is smoke-test: Remove all dev artifacts in DMG cleanup. What does it have to do with the rename step?

Previously (before a recent push) there was another commit at position 3 - a commit that introduces special case for Windows. With a recent push the commit was dropped, but its description was still present in the cover letter, and you quoted it.

The reason for dropping the commit was that it introduces unnecessary complications without adequate reward.

@wprzytula

wprzytula commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Skip redundant DLL copy on Windows
Since Cargo now outputs scylladb.dll (matching the desired install name exactly), the copy/rename step is no longer needed on Windows. Use the Cargo output directly for the imported target, which also avoids any potential DLL name embedding mismatch in the import library.

I thought we had copy step in general, not only on windows. Is thart not the case? And if it is the case, do we still need it?

Opus explains it very well:

Cargo outputs are named by the Rust [lib] name and placed in a deep path like:

  • scylla-rust-wrapper/<triple>/<profile>/libscylladb.so
  • scylla-rust-wrapper/<triple>/<profile>/libscylladb.a

The copy renames and relocates them to:

  • build/libscylladb.so.1.0.1 (versioned SONAME)
  • build/libscylladb_static.a (with _static suffix)
  • build/scylladb.lib (Windows import lib convention)

The reasons are:

  1. Versioned shared library naming: Cargo outputs libscylladb.so but Linux convention requires libscylladb.so.1.0.1 with a SONAME of libscylladb.so.1. Cargo doesn't support this — it just produces a bare .so. The copy step renames to the versioned filename, and symlinks provide libscylladb.so.1 and libscylladb.so.
  2. Static library _static suffix: Cargo outputs libscylladb.a but the project convention (inherited from DataStax) is libscylladb_static.a so both shared and static can coexist in the same directory. Cargo has no mechanism for this.
  3. Windows import library rename: Cargo outputs scylladb.dll.lib but MSVC convention expects scylladb.lib. The copy normalizes this.
  4. Flat build directory: Cargo puts artifacts deep in <target_dir>///. The copy brings them to build/ for convenient use by CPack, integration tests, and install rules.

So it's not technically a "rename" in the Rust crate sense — it's a post-build artifact staging step that bridges the gap between Cargo's output conventions and the platform library naming conventions that consumers and package managers expect.

@wprzytula wprzytula merged commit ead94af into scylladb:master Jun 8, 2026
12 checks passed
@wprzytula wprzytula deleted the rename-lib-to-scylladb branch June 8, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/Driver_-_cpp-rs-driver area/testing Related to unit/integration testing documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mess and legacies in library naming

3 participants