Near Learn

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#

LibraryLanguageStatusWhat it’s forLink
near-sdk-rs (near-sdk crate)RustOfficial, 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-jsJavaScript / TypeScriptCommunity 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-pyPythonCommunityA Pythonic contract SDK for experiments and prototypes.r-near/near-sdk-py
near-sdk-goGoCommunityWrite contracts in Go (compiled to Wasm).vlmoon99/near-sdk-go
Contract SDKs by language

Standards and reusable patterns (Rust)#

LibraryLanguageWhat it’s forLink
near-contract-standardsRustOfficial 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-toolsRustDerive 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-pluginsRustAttribute-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
Crates that sit on top of near-sdk-rs
Typical Cargo.toml for a Rust contract (versions current as of late 2026)
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

  1. 1.You are writing a new NEAR contract that will custody user funds. Which SDK is the sensible default?
  2. 2.You need a NEP-245 multi-token contract with role-based access control, using derive macros. Which crate fits best?
  3. 3.Your contract needs a pause switch and upgrades that only take effect after a staging delay. Which library gives you this out of the box?