Internal SDK
For more in-depth documentation please review the SDK Architecture and
the Internal SDK 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-internal.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-internal/crates/bitwarden-wasm-internal/npm
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-internal/crates/bitwarden-uniffi/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