Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .cargo/config.toml

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- name: Cache
Expand All @@ -53,7 +53,7 @@ jobs:
uses: taiki-e/install-action@cargo-hack
- name: Check libraries
run: >-
cargo +nightly
cargo
hack
--feature-powerset
--exclude-features default
Expand Down Expand Up @@ -92,17 +92,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable
- name: Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "nightly"
- name: Check documentation
env:
RUSTDOCFLAGS: -A rustdoc::redundant-explicit-links -D warnings
run: cargo doc --no-deps --all-features --workspace --examples
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Cargo tools
uses: taiki-e/install-action@v2
with:
Expand Down
3 changes: 0 additions & 3 deletions .rustfmt.toml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ categories = ["cryptography::cryptocurrencies"]
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/AftermathFinance/aftermath-sdk-rust"
rust-version = "1.86"
rust-version = "1.88"

[workspace.lints.clippy]
double_parens = "allow"
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Over time, a lot of JSON-RPC methods used above will be available through GraphQ

#### Programmable Transaction Blocks (PTBs)

PTBs define what actually will be executed onchain. The recommended way to build programmable transactions is using the [`ptb!`] macro.
PTBs define what actually will be executed onchain. The recommended way to build programmable transactions is using the [`ptb!`] macro.

```rust
use af_sui_types::ProgrammableTransaction;
Expand Down Expand Up @@ -207,9 +207,7 @@ Of course, displaying is just a toy example of what you can do with the converte

To build the documentation locally, use
```
RUSTDOCFLAGS="-D warnings -Zunstable-options --generate-link-to-definition" cargo +nightly doc \
-Zunstable-options \
-Zrustdoc-map \
RUSTDOCFLAGS="-D warnings --generate-link-to-definition" cargo doc \
--no-deps \
--all-features
```
5 changes: 2 additions & 3 deletions crates/af-faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ rust-version.workspace = true

[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="-Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo +nightly doc --all-features --no-deps --open
# RUSTDOCFLAGS="--generate-link-to-definition" cargo doc --all-features --no-deps --open
all-features = true
rustdoc-args = [
# Generate links to definition in rustdoc source code pages
# https://github.com/rust-lang/rust/pull/84176
"--generate-link-to-definition",
"-Zunstable-options",
]

[lints]
Expand All @@ -30,4 +29,4 @@ workspace = true
# https://rust-lang.github.io/rfcs/3516-public-private-dependencies.html
af-sui-pkg-sdk = { version = "0.14.0", public = true, path = "../af-sui-pkg-sdk" }
sui-framework-sdk = { version = "0.16.0", public = true, path = "../sui-framework-sdk" }
sui-sdk-types = { version = "0.2", public = true }
sui-sdk-types = { version = "0.3", public = true }
2 changes: 0 additions & 2 deletions crates/af-faucet/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg_attr(all(doc, not(doctest)), feature(doc_cfg))]

//! Move types for `AftermathFaucet` used in development

use af_sui_pkg_sdk::sui_pkg_sdk;
Expand Down
46 changes: 21 additions & 25 deletions crates/af-iperps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ rust-version.workspace = true

[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="-Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo +nightly doc --all-features --no-deps --open
# RUSTDOCFLAGS="--generate-link-to-definition" cargo doc --all-features --no-deps --open
all-features = true
rustdoc-args = [
# Generate links to definition in rustdoc source code pages
# https://github.com/rust-lang/rust/pull/84176
"--generate-link-to-definition",
"-Zunstable-options",
]

[lints]
Expand All @@ -44,10 +43,10 @@ stop-orders = ["dep:fastcrypto"]
af-sui-pkg-sdk = { version = "0.14.0", public = true, path = "../af-sui-pkg-sdk" }
af-utilities = { version = "0.14.0", public = true, path = "../af-utilities" }
num_enum = { version = "0.7", public = true }
strum = { version = "0.27", public = true, features = ["derive"] }
strum = { version = "0.28", public = true, features = ["derive"] }
sui-framework-sdk = { version = "0.16.0", public = true, path = "../sui-framework-sdk" }
sui-gql-client = { version = "0.25", public = true, default-features = false, optional = true, path = "../sui-gql-client" }
sui-sdk-types = { version = "0.2", public = true }
sui-sdk-types = { version = "0.3", public = true }

# TODO: remove this after using Rust's `Option` (see TODO in `lib.rs`)
move-stdlib-sdk = { version = "0.15.0", public = true, path = "../move-stdlib-sdk" }
Expand All @@ -66,7 +65,7 @@ thiserror = "2"
# GraphQL RPC (optional)
async-stream = { version = "0.3", optional = true }
cynic = { version = "3", optional = true }
enum-as-inner = { version = "0.6", optional = true }
enum-as-inner = { version = "0.7", optional = true }
futures = { version = "0.3", optional = true }
graphql-extract = { version = "0.0.11", path = "../graphql-extract", optional = true }

Expand All @@ -78,29 +77,26 @@ default-features = false
features = ["build"]
optional = true
path = "../sui-gql-schema"
version = "0.17.0"
version = "0.17.0"


[dev-dependencies]
af-ptbuilder = { path = "../af-ptbuilder" }
af-sui-types = { path = "../af-sui-types", features = ["hash"] }
clap = { version = "4", features = ["derive"] }
color-eyre = "0.6"
indicatif = "0.17"
insta = "1"
nonempty = "0.11"
num_enum = "0.7"
proptest = "1"
public-api = "0.50.1"
reqwest = "0.12"
rgb = "0.8"
rustdoc-json = "0.9.5"
rustup-toolchain = "0.1.10"
sui-gql-client = { path = "../sui-gql-client" }
test-strategy = "0.4"
textplots = "0.8"
tokio = { version = "1", features = ["full"] }
tokio-test = "0.4"
af-ptbuilder = { path = "../af-ptbuilder" }
af-sui-types = { path = "../af-sui-types", features = ["hash"] }
clap = { version = "4", features = ["derive"] }
color-eyre = "0.6"
indicatif = "0.18"
insta = "1"
nonempty = "0.12"
num_enum = "0.7"
proptest = "1"
reqwest = "0.13"
rgb = "0.8"
sui-gql-client = { path = "../sui-gql-client" }
test-strategy = "0.4"
textplots = "0.8"
tokio = { version = "1", features = ["full"] }
tokio-test = "0.4"


[[example]]
Expand Down
30 changes: 0 additions & 30 deletions crates/af-iperps/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg_attr(all(doc, not(doctest)), feature(doc_cfg))]

//! Move types for Aftermath's `Perpetuals` package

use af_move_type::otw::Otw;
Expand Down Expand Up @@ -1191,31 +1189,3 @@ impl self::ordered_map::Map<Order> {
)
}
}

#[cfg(test)]
mod tests {
/// Taken from
/// <https://github.com/cargo-public-api/cargo-public-api?tab=readme-ov-file#-as-a-ci-check>
#[test]
fn public_api() {
// Install a compatible nightly toolchain if it is missing
rustup_toolchain::install(public_api::MINIMUM_NIGHTLY_RUST_VERSION).unwrap();

// Build rustdoc JSON
let rustdoc_json = rustdoc_json::Builder::default()
.toolchain(public_api::MINIMUM_NIGHTLY_RUST_VERSION)
.build()
.unwrap();

// Derive the public API from the rustdoc JSON
let public_api = public_api::Builder::from_rustdoc_json(rustdoc_json)
.omit_blanket_impls(true)
.omit_auto_trait_impls(true)
.omit_auto_derived_impls(true)
.build()
.unwrap();

// Assert that the public API looks correct
insta::assert_snapshot!(public_api);
}
}
Loading
Loading