diff --git a/CLAUDE.md b/CLAUDE.md index d35c3fd..b609312 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -189,6 +189,15 @@ Core clients are tested using mocked API calls with wiremock. All functions maki - The Configuration env-var table and the Error Handling class table are duplicated verbatim across all four per-language READMEs. When one changes, update all four — keep them byte-identical. - Per-language READMEs are wired into package metadata (`crates/core/Cargo.toml` `readme`, `pyproject.toml` `readme`, `npm/package.json` `files`, `ruby/quicknode_sdk.gemspec` `s.files`). When adding a new language or moving a README, update the corresponding manifest. +### Platform support + +Precompiled binaries ship for these targets, controlled by `.github/workflows/release.yml` and `Cross.toml`: +- **Linux glibc** (Python, Node, Ruby) — `x86_64`/`aarch64`, pinned to **glibc 2.17** via `cross` + `zig cc` (manylinux2014 baseline). Do not bump this floor without updating the per-language READMEs and confirming we're prepared to drop RHEL 7 / Ubuntu 14.04-era distros. +- **Linux musl** (Python, Node only) — `x86_64`/`aarch64`. Ruby is excluded on purpose because the Rust `cdylib` is incompatible with musl (no dynamic linker); the source gem exists only as a Bundler fallback that raises `LoadError`. +- **macOS** — `aarch64-apple-darwin` (Apple Silicon) only, built locally via `just macos-build-and-publish` during release. No Intel macOS, no Windows. + +If you change the target matrix in `release.yml`, `Cross.toml`, `npm/package.json`'s `napi.targets`, or `Justfile`'s `macos-build-and-publish`, update the **Platform Support** section in all four per-language READMEs in the same PR. + ## Code style ### Imports diff --git a/crates/core/README.md b/crates/core/README.md index 7e7d883..861e2a9 100644 --- a/crates/core/README.md +++ b/crates/core/README.md @@ -9,6 +9,7 @@ This is one of four language bindings published from the same Rust core. See the - [Installation](#installation) - [Quick Start](#quick-start) - [Configuration](#configuration) +- [Platform Support](#platform-support) - [API Reference](#api-reference) - [Admin Client](#admin-client) - [Endpoints](#endpoints) @@ -97,6 +98,12 @@ Environment variables (prefix `QN_SDK__`, separator `__`): | `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL | | `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL | +## Platform Support + +`quicknode-sdk` is a pure-Rust source crate — it builds wherever `rustc` and `reqwest` are supported. It is regularly tested on Linux (glibc) and macOS (Apple Silicon). Windows is not tested. + +If you are using one of the language bindings (`quicknode-sdk` on PyPI, `@quicknode/sdk` on npm, `quicknode_sdk` on RubyGems), see that package's README for the precompiled-binary platform matrix. + ## API Reference Snippets assume `qn` was already constructed via the Quick Start. Optional parameters are skipped unless showing one is needed to illustrate usage. diff --git a/crates/core/src/kvstore/mod.rs b/crates/core/src/kvstore/mod.rs index 94172b9..55ab344 100644 --- a/crates/core/src/kvstore/mod.rs +++ b/crates/core/src/kvstore/mod.rs @@ -77,6 +77,7 @@ pub struct GetSetsParams { #[cfg_attr(feature = "node", napi(object))] #[cfg_attr(not(feature = "node"), derive(Clone))] #[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct BulkSetsParams { /// Key/value pairs to add. #[serde(skip_serializing_if = "Option::is_none")] @@ -131,6 +132,7 @@ pub struct GetListParams { #[cfg_attr(feature = "node", napi(object))] #[cfg_attr(not(feature = "node"), derive(Clone))] #[derive(Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct UpdateListParams { /// Items to add to the list. #[serde(skip_serializing_if = "Option::is_none")] @@ -947,7 +949,7 @@ mod tests { Mock::given(method("POST")) .and(path("/sets/bulk")) .and(body_json(serde_json::json!({ - "add_sets": {"k1": "v1"} + "addSets": {"k1": "v1"} }))) .respond_with( ResponseTemplate::new(201) @@ -973,7 +975,7 @@ mod tests { Mock::given(method("POST")) .and(path("/sets/bulk")) .and(body_json(serde_json::json!({ - "delete_sets": ["k1", "k2"] + "deleteSets": ["k1", "k2"] }))) .respond_with( ResponseTemplate::new(201) @@ -1254,8 +1256,8 @@ mod tests { Mock::given(method("PATCH")) .and(path("/lists/my-list")) .and(body_json(serde_json::json!({ - "add_items": ["c"], - "remove_items": ["a"] + "addItems": ["c"], + "removeItems": ["a"] }))) .respond_with( ResponseTemplate::new(200) diff --git a/npm/README.md b/npm/README.md index c1474be..24bf54e 100644 --- a/npm/README.md +++ b/npm/README.md @@ -9,6 +9,7 @@ This is one of four language bindings published from the same Rust core. See the - [Installation](#installation) - [Quick Start](#quick-start) - [Configuration](#configuration) +- [Platform Support](#platform-support) - [API Reference](#api-reference) - [Admin Client](#admin-client) - [Endpoints](#endpoints) @@ -94,6 +95,20 @@ Environment variables (prefix `QN_SDK__`, separator `__`): | `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL | | `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL | +## Platform Support + +Precompiled native modules are published for: + +| Platform | Targets | +|---|---| +| Linux (glibc) | `x86_64`, `aarch64` — glibc **2.17+** (manylinux2014) | +| Linux (musl) | `x86_64`, `aarch64` — Alpine and other musl distros | +| macOS | Apple Silicon (`arm64`) | + +Linux glibc binaries are built against glibc 2.17 so they load on any distro from 2014 onward — RHEL 7+, Ubuntu 14.04+, Debian 8+, Amazon Linux 2+, SLES 12+, Fedora 19+. On unsupported platforms, `require('@quicknode/sdk')` throws an error listing the available targets. + +**Not supported:** RHEL/CentOS 6 (glibc 2.12), Debian 7 (glibc 2.13), Ubuntu 12.04 (glibc 2.15), SLES 11 (glibc 2.11), Intel macOS, Windows. + ## API Reference Snippets assume `qn` was already constructed via the Quick Start. Optional parameters are skipped unless showing one is needed to illustrate usage. diff --git a/python/README.md b/python/README.md index 8caeab2..b963eeb 100644 --- a/python/README.md +++ b/python/README.md @@ -9,6 +9,7 @@ This is one of four language bindings published from the same Rust core. See the - [Installation](#installation) - [Quick Start](#quick-start) - [Configuration](#configuration) +- [Platform Support](#platform-support) - [API Reference](#api-reference) - [Admin Client](#admin-client) - [Endpoints](#endpoints) @@ -98,6 +99,20 @@ Environment variables (prefix `QN_SDK__`, separator `__`): | `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL | | `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL | +## Platform Support + +Precompiled wheels are published for: + +| Platform | Targets | +|---|---| +| Linux (glibc) | `x86_64`, `aarch64` — glibc **2.17+** (manylinux2014) | +| Linux (musl) | `x86_64`, `aarch64` — Alpine and other musl distros | +| macOS | Apple Silicon (`arm64`) | + +Linux glibc wheels are built against glibc 2.17 so they load on any distro from 2014 onward — RHEL 7+, Ubuntu 14.04+, Debian 8+, Amazon Linux 2+, SLES 12+, Fedora 19+. If `pip install quicknode-sdk` resolves to a source distribution on your platform, you're on something we don't have a prebuilt wheel for — see the matrix above. + +**Not supported:** RHEL/CentOS 6 (glibc 2.12), Debian 7 (glibc 2.13), Ubuntu 12.04 (glibc 2.15), SLES 11 (glibc 2.11), Intel macOS, Windows. + ## API Reference Snippets assume `qn` was already constructed via the Quick Start. Optional parameters are skipped unless showing one is needed to illustrate usage. diff --git a/ruby/README.md b/ruby/README.md index afe0bb2..e469ba1 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -9,6 +9,7 @@ This is one of four language bindings published from the same Rust core. See the - [Installation](#installation) - [Quick Start](#quick-start) - [Configuration](#configuration) +- [Platform Support](#platform-support) - [API Reference](#api-reference) - [Admin Client](#admin-client) - [Endpoints](#endpoints) @@ -88,6 +89,19 @@ Environment variables (prefix `QN_SDK__`, separator `__`): | `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL | | `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL | +## Platform Support + +Precompiled platform gems are published for: + +| Platform | Targets | +|---|---| +| Linux (glibc) | `x86_64-linux`, `aarch64-linux` — glibc **2.17+** (manylinux2014) | +| macOS | Apple Silicon (`arm64-darwin`) | + +Linux gems are built against glibc 2.17 so they load on any distro from 2014 onward — RHEL 7+, Ubuntu 14.04+, Debian 8+, Amazon Linux 2+, SLES 12+, Fedora 19+. + +**Not supported:** Alpine and other musl-libc distros (the Rust cdylib that backs the gem requires the dynamic linker glibc provides), RHEL/CentOS 6 (glibc 2.12), Debian 7 (glibc 2.13), Ubuntu 12.04 (glibc 2.15), Intel macOS, Windows. The `ruby`-platform fallback gem is present only so Bundler's resolver can complete on those platforms — `require "quicknode_sdk"` raises a `LoadError` listing the supported platforms. + ## API Reference Snippets assume `qn` was already constructed via the Quick Start. Optional parameters are skipped unless showing one is needed to illustrate usage.