docs.rs failed to build drift-rs-1.0.0-alpha.2
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*
= { = "v1.0.0-alpha.1" }
# build from source (also builds and links 'libdrift_ffi_sys'
= { = "https://github.com/drift-labs/drift-rs", = "v1.0.0-alpha.1" }
*drift-rs uses drift program over ffi.
ensure libdrift_ffi_sys is installed when using via crates.io.
Use
use ;
use KeyPair;
async
Setup
Mac (m-series)
Install rosetta and configure Rust toolchain for x86_64
# replace `1.81.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 or optionally install from drift-ffi-sys
# Build from source
CARGO_DRIFT_FFI_STATIC=1
# Provide a prebuilt drift_ffi_sys lib
CARGO_DRIFT_FFI_PATH="/path/to/libdrift_ffi_sys"