SDK
Bitwarden provides a public Software Development Kit (SDK) for Secrets Manager and an internal SDK for the Bitwarden Password Manager. The SDK is written in Rust and provides bindings for multiple languages.
For more in-depth documentation please review the SDK Architecture page
and the project's README
.
Requirements
See the Tools and Libraries page for more information.
Setup instructions
-
Clone the repository:
git clone https://github.com/bitwarden/sdk.git
cd sdk -
Install the dependencies:
npm ci
Building the SDK
To build the SDK, run the following command:
cargo build
Linking the SDK to clients
After modifying the SDK, it can be beneficial to test the changes in the client applications. To do so you will need to update the SDK reference in the client applications.
These instructions assumes you have a directory structure similar to:
sdk/
clients/
ios/
android/
Web clients
The web clients uses NPM to install the SDK as a dependency. NPM offers a dedicated command
link
which can be used to temporarily replace the packages with a local version.
npm link ../sdk/languages/js/sdk-internal
Running npm ci
or npm install
will replace the linked packages with the published version.
Mobile
Android
-
Build and publish the SDK to the local Maven repository:
../sdk/languages/kotlin/publish-local.sh
-
Set the user property
localSdk=true
in theuser.properties
file.
iOS
Run the bootstrap script with the LOCAL_SDK
environment variable set to true in order to use the
local SDK build:
LOCAL_SDK=true ./Scripts/bootstrap.sh