{"id":21044091,"url":"https://github.com/drift-labs/drift-ffi-sys","last_synced_at":"2026-03-12T09:47:39.637Z","repository":{"id":263501401,"uuid":"860377620","full_name":"drift-labs/drift-ffi-sys","owner":"drift-labs","description":"FFI bindings for Drift program","archived":false,"fork":false,"pushed_at":"2026-01-23T22:54:11.000Z","size":627,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-24T00:49:56.338Z","etag":null,"topics":["drift","solana"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drift-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-20T10:17:16.000Z","updated_at":"2026-01-23T22:50:19.000Z","dependencies_parsed_at":"2025-12-18T03:00:50.984Z","dependency_job_id":null,"html_url":"https://github.com/drift-labs/drift-ffi-sys","commit_stats":null,"previous_names":["drift-labs/drift-ffi-sys"],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/drift-labs/drift-ffi-sys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drift-labs%2Fdrift-ffi-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drift-labs%2Fdrift-ffi-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drift-labs%2Fdrift-ffi-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drift-labs%2Fdrift-ffi-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drift-labs","download_url":"https://codeload.github.com/drift-labs/drift-ffi-sys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drift-labs%2Fdrift-ffi-sys/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29167876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T15:38:29.831Z","status":"ssl_error","status_checked_at":"2026-02-06T15:37:48.592Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drift","solana"],"created_at":"2024-11-19T14:15:23.603Z","updated_at":"2026-02-06T16:11:23.895Z","avatar_url":"https://github.com/drift-labs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drift-ffi\n\nExposes C-ABI bindings for drift program.\n\nGoals:\n1) Enable building SDKs that reuse program logic.  \n2) Separate rust SDK from program/solana runtime dependencies. Allows rust SDK to freely update to latest solana-* crates with bug fixes, improvements, etc.\n\n\u003cimg src='./architecture.png'/\u003e\n\n## Installation\n\n### Prebuilt\n\nDownload latest [release libs](https://github.com/drift-labs/drift-ffi-sys/releases), unzip and link/copy to `/usr/lib` (linux) or `/usr/local/lib` (mac)\n\n### from Source\n```shell\nrustup install 1.76.0-x86_64-apple-darwin # M1 mac\nrustup install 1.76.0-x86_64-unknown-linux-gnu # linux\n\ncargo build --release\nln -sf ./target/release/libdrift_ffi_sys.dylib /usr/local/lib # mac\nln -sf ./target/release/libdrift_ffi_sys.so /usr/lib #linux\n``` \n\n## Developer Notes\n- this crate must be built with rust \u003c= 1.76.0 to provide compatibility with onchain data layouts (later rust versions have breaking changes [128-bit integer C-abi compatibility](https://blog.rust-lang.org/2024/03/30/i128-layout-update.html))\n\n- for rust users this crate is intended to be linked via compiler flags (not Cargo dependency) as it compiles to a (platform dependent) dynamic lib (`.so/.dylib/.dll`)\n\n- can ignore most of the warnings for FFI safety. The main issue are types containing `u128`/`i128`s which are handled by a custom `compat::u128/i128` type that forces correct alignment where required.\n\n## Bump Program Version\nCI job does this automatically but occasionally fails due to breaking changes.\n\n1) checkout / pull master\n2) update `tag = \"v2.140.0\"` to the latest version in `Cargo.toml`\n\n```Cargo.toml\ndrift-program = { package = \"drift\", git = \"https://github.com/drift-labs/protocol-v2.git\", tag = \"v2.140.0\", features = [\n    \"mainnet-beta\", \"drift-rs\"\n] }\n```\n\n3) update Cargo.toml to new version: `version = \"vX.Y.Z\"`\n\n4) `cargo check` and fix any compile issues\n\n5) git commit, `git tag -v vX.Y.Z` and push to release the new version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrift-labs%2Fdrift-ffi-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrift-labs%2Fdrift-ffi-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrift-labs%2Fdrift-ffi-sys/lists"}