-
Notifications
You must be signed in to change notification settings - Fork 25
[Epic] Phase 5: Platform SDKs (deferred) #731
Copy link
Copy link
Open
Labels
design-data-specDesign Data Specification / SDK effortDesign Data Specification / SDK effortsdk/nodeNode.js SDK (napi-rs)Node.js SDK (napi-rs)sdk/swiftSwift SDK (UniFFI)Swift SDK (UniFFI)sdk/wasmWASM buildWASM build
Milestone
Description
Description
Build thin platform-specific wrappers around the Rust core library, enabling each implementation team to use the SDK in their native language.
Status: Deferred. No platform consumers are currently ready to adopt the SDK. This phase will be broken down into sub-issues when a platform team expresses readiness. The WASM build may be pulled forward if the authoring app (Phase 4) or other browser-based tooling needs it — note that Figma plugins cannot use WASM.
Scope
- Node.js SDK (
sdk/node/): napi-rs bindings with TypeScript types. Primary consumers: React Spectrum, Spectrum Web Components, build tools, authoring app (Electron) - WASM build (
sdk/wasm/): wasm-bindgen + wasm-pack for browser/Cloudflare Workers. Fallback for environments without native addon support. Not usable in Figma plugins. - Swift SDK (
sdk/swift/): UniFFI-generated Swift bindings + Swift Package Manager distribution. Consumer: Spectrum iOS - Kotlin SDK (
sdk/kotlin/): UniFFI-generated Kotlin bindings. Consumer: Spectrum Android - UniFFI IDL (
sdk/uniffi-bindings/): Shared interface definition that generates both Swift and Kotlin bindings from one source - TypeScript types: Full type definitions for the Node.js SDK API surface
- Platform-specific distribution: npm package, Swift Package, Maven/Gradle artifact, wasm-pack package
Likely first deliverable
The Node.js SDK (napi-rs) is the most likely first deliverable, driven by the authoring app (Phase 4) needing Rust core access from Electron. This would be pulled forward from Phase 5 into Phase 4 when the authoring app work reaches that point.
Architecture
design-data-core (Rust)
├── Native static/dynamic lib
├── WASM (.wasm) — not usable in Figma plugins
└── CLI binary
Wrappers:
├── Node.js (napi-rs) → npm
├── Swift (UniFFI) → SPM
├── Kotlin (UniFFI) → Maven
└── WASM (wasm-bindgen) → npm/CDN
References
- #715 — Distributed Design Data Architecture — Platform repos consuming the SDK
- #714 — Design Data Specification
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
design-data-specDesign Data Specification / SDK effortDesign Data Specification / SDK effortsdk/nodeNode.js SDK (napi-rs)Node.js SDK (napi-rs)sdk/swiftSwift SDK (UniFFI)Swift SDK (UniFFI)sdk/wasmWASM buildWASM build