Contract SDKs & building blocks
The NEAR smart contract SDKs: near-sdk-rs, near-contract-standards, near-plugins and near-sdk-contract-tools, plus the JS, Python and Go community SDKs.
Beginner4 min read3-question check
A NEAR contract is a Wasm binary, so in principle any language that compiles to Wasm works. In practice one SDK carries almost all production code: near-sdk-rs, the Rust SDK maintained by the NEAR core team. Everything else in this lesson either sits on top of it (standards, plugins, derive macros) or is a community SDK for another language.
docs.near.org documents only the Rust SDK; it lists the JavaScript, Python and Go SDKs as community SDKs that are "great for prototyping and learning" (source).
The SDKs#
| Library | Language | Status | What it’s for | Link |
|---|---|---|---|---|
near-sdk-rs (near-sdk crate) | Rust | Official, actively released (5.x) | The #[near] macro, storage collections, env::* host functions, promises / cross-contract calls, unit-test helpers. The default choice for anything holding value. | near/near-sdk-rs · docs.rs |
| near-sdk-js | JavaScript / TypeScript | Community tier per docs; last npm release 2.0.0 (June 2024) | Decorator-based contracts (@NearBindgen, @view, @call) compiled to Wasm with an embedded JS engine. Fine for learning; heavier gas and binary size than Rust. | near/near-sdk-js |
| near-sdk-py | Python | Community | A Pythonic contract SDK for experiments and prototypes. | r-near/near-sdk-py |
| near-sdk-go | Go | Community | Write contracts in Go (compiled to Wasm). | vlmoon99/near-sdk-go |
Standards and reusable patterns (Rust)#
| Library | Language | What it’s for | Link |
|---|---|---|---|
| near-contract-standards | Rust | Official reference implementations shipped from the near-sdk-rs repo: fungible token (NEP-141), non-fungible token (NEP-171), storage management (NEP-145), contract source metadata (NEP-330) and upgrade helpers. Versioned in lock-step with near-sdk. | near-sdk-rs/near-contract-standards |
| near-sdk-contract-tools | Rust | Derive macros for FT, NFT and multi-token (NEP-245), storage-fee management, Owner, Pause, role-based access control, escrow and NEP-297 events. Its README calls it a complement to near-contract-standards. | near/near-sdk-contract-tools |
| near-plugins | Rust | Attribute-macro plugins: Ownable, Pausable, Upgradable (stage code, then deploy after an optional delay) and AccessControllable (roles). Maintained under the near org (moved from Near-One); v0.5.x released in 2026. | near/near-plugins |
TOML
[dependencies]
near-sdk = "5.29"
# FT / NFT / storage management reference implementations
near-contract-standards = "5.29"
# optional: Ownable / Pausable / Upgradable / AccessControllable
near-plugins = "0.5"
[dev-dependencies]
# enables near_sdk::test_utils (VMContextBuilder, testing_env!)
near-sdk = { version = "5.29", features = ["unit-testing"] }Check yourself
3 questions · progress saved in this browser