docs.rs failed to build drift-rs-1.0.0-alpha.8
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
drift-rs-1.0.0-alpha.15
drift-rs
Experimental, high performance Rust SDK for building offchain clients for Drift V2 protocol.
Install
# crates.io
= "1.0.0-alpha.8"
# build from source
= { = "https://github.com/drift-labs/drift-rs", = "v1.0.0-alpha.8" }
Use
use ;
use KeyPair;
async
Setup
Mac (m-series)
Install rosetta and configure Rust toolchain for x86_64
# replace `1.84.0` with preferred stable version
⚠️ the default toolchain is incompatible due to memory layout differences between solana program (BPF) and aarch64 and will fail at runtime with deserialization errors like: InvalidSize.
Local Development
drift-rs links to the drift program crate via FFI, build from source (default) or dynamically link with a version from drift-ffi-sys
# Build from source (default)
CARGO_DRIFT_FFI_STATIC=1
# Provide a prebuilt drift_ffi_sys lib
CARGO_DRIFT_FFI_PATH="/path/to/libdrift_ffi_sys"
Development
Release
git tag v<MAJOR.MINOR.PATCH> && git push
Updating IDL types
- copy the updated IDL to
res/drift.jsonfrom protocol-v2 branch cargo check- commit changes