From 83dc89cf4004dfc168daaad08462ada901dbedf6 Mon Sep 17 00:00:00 2001 From: jordy25519 Date: Wed, 2 Oct 2024 10:27:43 +0800 Subject: [PATCH] give up, manually install libdrift_ffi_sys --- .github/workflows/build.yml | 23 +++---- Cargo.lock | 122 +++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- 3 files changed, 126 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c037b32..00b0305 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,10 @@ jobs: rustup install 1.76.0-x86_64-unknown-linux-gnu - name: Format run: cargo fmt --all -- --check + - name: install libdrift_ffi_sys + run: | + curl -L https://github.com/user-attachments/files/17126152/libdrift_ffi_sys.so.zip > ffi.zip && unzip ffi.zip + sudo ln -sf libdrift_ffi_sys.so /usr/local/lib - uses: ubicloud/rust-cache@v2 with: path: | @@ -44,14 +48,11 @@ jobs: - name: Build run: | cargo -V - cargo build -vv - ./target/debug/drift-gateway -v || true - ldd ./target/debug/drift-gateway - objdump -x ./target/debug/drift-gateway | grep PATH || true - # - name: Test - # env: - # DRIFT_GATEWAY_KEY: ${{ secrets.DRIFT_GATEWAY_KEY }} - # # limit test parallelism to prevent hitting RPC rate-limits - # run: | - # cargo -V - # cargo test --all -- --test-threads=1 + cargo check + - name: Test + env: + DRIFT_GATEWAY_KEY: ${{ secrets.DRIFT_GATEWAY_KEY }} + # limit test parallelism to prevent hitting RPC rate-limits + run: | + cargo -V + cargo test --all -- --test-threads=1 diff --git a/Cargo.lock b/Cargo.lock index bffc3fc..3e9c6f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -544,6 +544,55 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.89" @@ -1291,6 +1340,12 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "combine" version = "3.8.1" @@ -1556,6 +1611,20 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -1688,7 +1757,7 @@ dependencies = [ "actix-web", "argh", "drift-rs", - "env_logger", + "env_logger 0.9.3", "futures-util", "log", "rust_decimal", @@ -1705,7 +1774,7 @@ dependencies = [ [[package]] name = "drift-idl-gen" version = "0.1.0" -source = "git+https://github.com/drift-labs/drift-rs?branch=fix/rpath#b40189e5d3d712f7a5b70e7c0433d21a7428e226" +source = "git+https://github.com/drift-labs/drift-rs?tag=v1.0.0-alpha.0#2abbbb6ba589a28af6330ee8a2094630c3dde027" dependencies = [ "proc-macro2", "quote", @@ -1718,15 +1787,15 @@ dependencies = [ [[package]] name = "drift-rs" version = "1.0.0" -source = "git+https://github.com/drift-labs/drift-rs?branch=fix/rpath#b40189e5d3d712f7a5b70e7c0433d21a7428e226" +source = "git+https://github.com/drift-labs/drift-rs?tag=v1.0.0-alpha.0#2abbbb6ba589a28af6330ee8a2094630c3dde027" dependencies = [ "abi_stable", "anchor-lang", - "base64 0.21.7", + "base64 0.22.1", "bytemuck", - "dashmap", + "dashmap 6.1.0", "drift-idl-gen", - "env_logger", + "env_logger 0.11.5", "fnv", "futures-util", "log", @@ -1824,6 +1893,16 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "env_filter" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" version = "0.9.3" @@ -1837,6 +1916,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -2381,6 +2473,12 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -3889,7 +3987,7 @@ checksum = "4d7d9dde51417ce52076059b3802db8e14c7c92e00e562208d9d53361bfd3f12" dependencies = [ "async-trait", "bincode", - "dashmap", + "dashmap 5.5.3", "futures", "futures-util", "indexmap 2.5.0", @@ -4026,7 +4124,7 @@ version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c94ce4da36c6b28b6d741cbd99bf4238b8ae93ce0c8f8c72225faa21a140645e" dependencies = [ - "env_logger", + "env_logger 0.9.3", "lazy_static", "log", ] @@ -4470,7 +4568,7 @@ dependencies = [ "async-channel", "bytes", "crossbeam-channel", - "dashmap", + "dashmap 5.5.3", "futures-util", "histogram", "indexmap 2.5.0", @@ -5484,6 +5582,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.10.0" diff --git a/Cargo.toml b/Cargo.toml index 8454b31..fd2c8f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] actix-web = "*" argh = "*" -drift-rs = { git = "https://github.com/drift-labs/drift-rs", branch = "fix/rpath" } +drift-rs = { git = "https://github.com/drift-labs/drift-rs", tag = "v1.0.0-alpha.0" } env_logger = "*" futures-util = "*" log = "*"