df-hyperliquid-core 0.1.0

Hyperliquid SDK for Rust with full API parity: info, exchange, websockets, HIP-3, HIP-4, HyperEVM and CoreWriter. Exact decimals, the fastest order signing of the SDKs benchmarked, native and wasm.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.94"
name = "df-hyperliquid-core"
version = "0.1.0"
authors = ["Dennis Furrer"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Hyperliquid SDK for Rust with full API parity: info, exchange, websockets, HIP-3, HIP-4, HyperEVM and CoreWriter. Exact decimals, the fastest order signing of the SDKs benchmarked, native and wasm."
homepage = "https://dfurrer.com"
documentation = "https://docs.rs/df-hyperliquid-core"
readme = "README.md"
keywords = [
    "hyperliquid",
    "hyperevm",
    "perps",
    "trading",
    "sdk",
]
categories = [
    "api-bindings",
    "cryptography::cryptocurrencies",
    "wasm",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/dennisfurrer/df-hyperliquid-core"

[package.metadata.docs.rs]
all-features = true

[features]
default = [
    "sign",
    "native",
]
native = [
    "dep:reqwest",
    "dep:tokio",
    "dep:tokio-tungstenite",
    "dep:futures-util",
]
offline = []
sign = [
    "dep:k256",
    "dep:zeroize",
    "dep:getrandom02",
]
web = [
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:js-sys",
    "dep:web-sys",
]

[lib]
name = "df_hyperliquid_core"
path = "src/lib.rs"

[[example]]
name = "market_order"
path = "examples/market_order.rs"
required-features = ["native"]

[[example]]
name = "outcome_trade"
path = "examples/outcome_trade.rs"
required-features = [
    "native",
    "sign",
]

[[example]]
name = "signed_order"
path = "examples/signed_order.rs"
required-features = [
    "native",
    "sign",
]

[[example]]
name = "subscribe"
path = "examples/subscribe.rs"
required-features = ["native"]

[[example]]
name = "web_book"
path = "examples/web_book.rs"
required-features = ["web"]

[[test]]
name = "conformance"
path = "tests/conformance/main.rs"

[[test]]
name = "live"
path = "tests/live/main.rs"

[[test]]
name = "mocked"
path = "tests/mocked/main.rs"

[dependencies.futures-util]
version = "0.3.34"
features = [
    "std",
    "sink",
]
optional = true
default-features = false

[dependencies.js-sys]
version = "0.3.106"
optional = true

[dependencies.k256]
version = "0.13.4"
features = ["ecdsa"]
optional = true

[dependencies.keccak]
version = "0.2.2"
features = ["parallel"]

[dependencies.reqwest]
version = "0.12.28"
features = [
    "rustls-tls",
    "http2",
]
optional = true
default-features = false

[dependencies.serde]
version = "1.0.229"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.151"
features = ["raw_value"]

[dependencies.thiserror]
version = "2.0.21"

[dependencies.tokio]
version = "1.53.1"
features = [
    "rt",
    "sync",
    "time",
    "macros",
    "net",
]
optional = true
default-features = false

[dependencies.tokio-tungstenite]
version = "0.29.0"
features = ["rustls-tls-webpki-roots"]
optional = true

[dependencies.wasm-bindgen]
version = "=0.2.129"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4.79"
optional = true

[dependencies.web-sys]
version = "0.3.106"
features = [
    "CloseEvent",
    "Headers",
    "MessageEvent",
    "RequestInit",
    "Response",
    "WebSocket",
]
optional = true

[dependencies.zeroize]
version = "1.9.0"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tokio]
version = "1.53.1"
features = [
    "macros",
    "rt-multi-thread",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom02]
version = "0.2.17"
features = ["js"]
optional = true
package = "getrandom"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "=0.3.79"

[lints.clippy]
dbg_macro = "deny"
expect_used = "deny"
float_arithmetic = "deny"
float_cmp = "warn"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"

[lints.rust]
missing_docs = "deny"
unsafe_code = "forbid"
unsafe_op_in_unsafe_fn = "deny"
unused_must_use = "deny"