Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compilation and linking of Rust files #11102

Closed
wants to merge 2 commits into from

Commits on Aug 29, 2022

  1. rust: adjust build according to cxxbridge's recommendations

    Currently, the rust build system in Scylla creates a separate
    static library for each incuded rust package. This could cause
    duplicate symbol issues when linking against multiple libraries
    compiled from rust.
    
    This issue is fixed in this pach by creating a single static library
    to link against, which combines all rust packages implemented in
    Scylla.
    
    The Cargo.lock for the combined build is now tracked, so that all
    users of the same scylla version also use the same versions of
    imported rust modules.
    
    Additionally, the rust package implementation and usage
    docs are modified to be compatible with the build changes.
    
    This patch also adds a new header file 'rust/cxx.hh' that contains
    definitions of additional rust types available in c++.
    wmitros committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    1b7b8a7 View commit details
    Browse the repository at this point in the history
  2. rust: add build profiles more aligned with ninja modes

    A cargo profile is created for each of build modes: dev, debug,
    sanitize, realease and coverage. The names of cargo profiles are
    prefixed by "rust-" because cargo does not allow separate "dev"
    and "debug" profiles.
    
    The main difference between profiles are their optimization levels,
    they correlate to the levels used in configure.py. The debug info
    is stripped only in the dev mode, and only this mode uses
    "incremental" compilation to speed it up.
    wmitros committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    f032b40 View commit details
    Browse the repository at this point in the history