Developer Information#
The following information is intended for developers who wish to modify the code.
The pages on Testing and Documentation are also relevant.
Building BridgeStan#
Developers should follow the instructions in Getting Started to ensure they have the minimal C++ build tools required for working with BridgeStan.
C++#
We use the C++1y standard for compilation (
-std=c++1y
in both clang and gcc). This is partway between C++11 and C++14, and is what Stan requires.We try to write standards-compliant code that does not depend on features of specific platforms (except where needed for compatibility). Specifically, we do not use OS-dependent or compiler-dependent C++. Our C++ code does not depend on the
R.h
orPython.h
headers, for example. On the other hand, adding new signatures to work with a specific language’s style of foreign function interface is permitted (an example can be found in the R compatibility functions, which requires a particular pointer-based style).We try to follow the Google C++ Style Guide, but (a) we allow C++ exceptions, and (b) we allow reference arguments.
We recommend using Clang format with our config file .clang-format.
Python#
Julia#
Julia dependencies:
Tar (standard library)
TOML (standard library)
Downloads (standard library)
Inflate.jl (external)
Julia code is formatted using JuliaFormatter.
R#
R dependencies:
Rust#
Rust development is based on cargo, which should handle dependencies and formatting.