From 13abafd118bb2cbe782aa19461fe89f3d95707cc Mon Sep 17 00:00:00 2001 From: 0xPlish Date: Thu, 17 Apr 2025 16:50:22 -0700 Subject: [PATCH] Upgrade to Anchor 0.31.x. Drop i128 cfg flag since it's included in Rust now. --- Cargo.toml | 4 ++-- flake.lock | 41 ++++------------------------------------- flake.nix | 4 ++-- src/aliases.rs | 10 ---------- 4 files changed, 8 insertions(+), 51 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a5201d1..bb2d091 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hylo-fix" -version = "0.3.0" +version = "0.4.0" edition = "2021" description = "Fixed-point number types with Solana Anchor support" authors = ["0xPlish ", "Curtis McEnroe "] @@ -17,7 +17,7 @@ name = "fix" idl-build = ["anchor-lang/idl-build"] [dependencies] -anchor-lang = "0.30.1" +anchor-lang = "0.31" anyhow = "1.0.82" muldiv = "1.0.1" num-traits = "0.2.17" diff --git a/flake.lock b/flake.lock index 6d84c86..222e909 100644 --- a/flake.lock +++ b/flake.lock @@ -18,24 +18,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1701282334, @@ -95,35 +77,20 @@ }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1708567842, - "narHash": "sha256-tJmra4795ji+hWZTq9UfbHISu+0/V8kdfAj2VYFk6xc=", + "lastModified": 1744857263, + "narHash": "sha256-M4X/CnquHozzgwDk+CbFb8Sb4rSGJttfNOKcpRwziis=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0b5394f1da0e50715d36a22d4912cb3b02e6b72a", + "rev": "9f3d63d569536cd661a4adcf697e32eb08d61e31", "type": "github" }, "original": { "owner": "oxalica", "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", + "rev": "9f3d63d569536cd661a4adcf697e32eb08d61e31", "type": "github" } } diff --git a/flake.nix b/flake.nix index 9a3326e..0550b4f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/23.11"; - rust-overlay.url = "github:oxalica/rust-overlay"; + rust-overlay.url = "github:oxalica/rust-overlay/9f3d63d569536cd661a4adcf697e32eb08d61e31"; flake-parts.url = "github:hercules-ci/flake-parts"; }; @@ -25,7 +25,7 @@ buildInputs = [ openssl pkg-config - rust-bin.stable.latest.complete + rust-bin.stable."1.81.0".default rust-analyzer ]; }; diff --git a/src/aliases.rs b/src/aliases.rs index e232ffc..8b3486b 100644 --- a/src/aliases.rs +++ b/src/aliases.rs @@ -9,17 +9,12 @@ pub mod binary { pub type UFix32 = Fix; pub type UFix64 = Fix; pub type UFixSize = Fix; - - #[cfg(feature = "i128")] pub type UFix128 = Fix; - pub type IFix8 = Fix; pub type IFix16 = Fix; pub type IFix32 = Fix; pub type IFix64 = Fix; pub type IFixSize = Fix; - - #[cfg(feature = "i128")] pub type IFix128 = Fix; } @@ -34,17 +29,12 @@ pub mod decimal { pub type UFix32 = Fix; pub type UFix64 = Fix; pub type UFixSize = Fix; - - #[cfg(feature = "i128")] pub type UFix128 = Fix; - pub type IFix8 = Fix; pub type IFix16 = Fix; pub type IFix32 = Fix; pub type IFix64 = Fix; pub type IFixSize = Fix; - - #[cfg(feature = "i128")] pub type IFix128 = Fix; }