C / C++ SDK
RBS provides native C and C++ support with compilation, linking, shared library management, and hermetic launcher scripts that handleLD_LIBRARY_PATH / DYLD_LIBRARY_PATH automatically.
Rules
C Rules
c_library
Creates a C static library (object archive).
c_shared_library
Creates a C shared library (.so / .dylib).
c_binary
Creates an executable C binary with a hermetic launcher script.
C++ Rules
cxx_library
Creates a C++ static library.
cxx_shared_library
Creates a C++ shared library.
cxx_binary
Creates an executable C++ binary.
Shared Library Handling
When ac_binary or cxx_binary depends on shared libraries, RBS automatically:
- Copies shared libraries into the target’s
runfiles/lib/directory. - Generates a launcher script that sets
LD_LIBRARY_PATH(Linux) andDYLD_LIBRARY_PATH(macOS) to point to the bundled libraries.