fetch and a WebSocket from any language. But Pylon ships first-party SDKs that handle the bookkeeping — auth tokens, optimistic mutations, reconnection, CRDT decoding, typed entities — so you don’t reinvent them.
Available SDKs
| Package | Use it for |
|---|---|
@pylonsync/sdk | Schema DSL + manifest builder. Required for codegen. |
@pylonsync/react | React hooks: useQuery, useMutation, useShard, useSession, useSearch, useAggregate, useInfiniteQuery |
@pylonsync/react-native | React Native + Expo: SQLite-backed offline replica, AsyncStorage adapter |
@pylonsync/next | Next.js App Router: Server Actions, RSC data fetching, middleware-friendly auth |
| Swift SDK | iOS / macOS / tvOS / watchOS / Linux native — PylonClient, PylonSync, PylonRealtime, PylonSwiftUI |
@pylonsync/sync | The sync engine — local store, mutation queue, WebSocket/SSE/poll transports. Used by every JS SDK; can be used standalone in non-React apps. |
@pylonsync/loro | Loro CRDT integration — collaborative text/lists/maps/trees that converge across clients |
Picking the right combination
| App type | Use |
|---|---|
| Web SPA (React) | @pylonsync/sdk + @pylonsync/react |
| Server-rendered web (Next.js) | @pylonsync/sdk + @pylonsync/react + @pylonsync/next |
| iOS / macOS native | Swift SDK |
| iOS + Android (cross-platform) | @pylonsync/sdk + @pylonsync/react-native |
| Vite SPA, Vue, Svelte, Solid | @pylonsync/sdk + @pylonsync/sync (call directly, no React) |
| CLI / server-to-server | @pylonsync/sdk (HTTP only) |
| Real-time multiplayer | Same as above + @pylonsync/react’s useShard (or PylonRealtime on Swift) |
| Collaborative editor | Add @pylonsync/loro (or PylonSync Loro bridge on Swift) |
@pylonsync/react on the web, the Swift SDK on iOS, and @pylonsync/react-native on Android — they all agree about what a ChangeEvent looks like, and CRDT bytes are identical across platforms because they wrap the same Loro Rust core.
Common quickstart
Every SDK shares the same shape. The TypeScript flow:Codegen
Every SDK supports typed access viapylon codegen:
- Entity types — Codable structs (Swift),
interfacedeclarations (TS) per entity - Function signatures — typed args and results
- Typed client extensions —
client.listTodos(),client.createTodo(NewTodo(...))instead of stringly-typed APIs