> ## Documentation Index
> Fetch the complete documentation index at: https://docs.near.org/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Libraries

> Choose an SDK to start building contracts.

The NEAR SDK is a library that allows you to develop smart contracts. Currently, there are two versions of the NEAR SDK: one for Rust and one for JavaScript.

<Warning>
  We **strongly recommend using the [Rust SDK](https://docs.rs/near-sdk/latest/near_sdk/)** for production contracts. Rust provides the most mature tooling, best performance, and the strongest safety guarantees when handling real assets on-chain. The JavaScript SDK is a great option for prototyping and learning.
</Warning>

<Tip>
  The best place to start learning is our [QuickStart Guide](/smart-contracts/quickstart).
</Tip>

<Columns cols={2}>
  <Card title="Rust SDK" icon="code" href="https://docs.rs/near-sdk/latest/near_sdk/">
    Rust SDK reference documentation.
  </Card>

  <Card title="JavaScript SDK" icon="js" href="https://near.github.io/near-sdk-js/">
    JavaScript SDK reference documentation.
  </Card>
</Columns>

## Smart contracts on NEAR

This is how a smart contract written in Rust and JavaScript using the NEAR SDK looks like:

<Tabs>
  <Tab title="JavaScript">
    ```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    @NearBindgen({})
    class HelloNear {
      greeting: string = 'Hello';

      @view({}) // This method is read-only and can be called for free
      get_greeting(): string {
        return this.greeting;
      }

      @call({}) // This method changes the state, for which it costs gas
      set_greeting({ greeting }: { greeting: string }): void {
        near.log(`Saving greeting ${greeting}`);
        this.greeting = greeting;
      }
    }
    ```
  </Tab>

  <Tab title="Rust">
    ```rust theme={"theme":{"light":"github-light","dark":"github-dark"}}
    #[near(contract_state)]
    pub struct Contract {
        greeting: String,
    }

    impl Default for Contract {
        fn default() -> Self {
            Self { greeting: "Hello".to_string(), }
        }
    }

    #[near]
    impl Contract {
        pub fn get_greeting(&self) -> String {
            self.greeting.clone()
        }

        pub fn set_greeting(&mut self, greeting: String) {
            self.greeting = greeting;
        }
    }
    ```
  </Tab>
</Tabs>

## Ready to start developing?

Start from our [Smart Contract QuickStart Guide](/smart-contracts/quickstart), and let it guide you through all our documentation on building smart contracts.

## Want to see examples?

We have a section dedicated to [tutorials and examples](/smart-contracts/tutorials/basic-contracts) that will help you understand diverse use cases and how to implement them.

## Reference docs

If you need to find a specific function signature, or understand the SDK structs and classes, visit the SDK-specific pages:

* [Rust SDK](https://docs.rs/near-sdk/latest/near_sdk/)
* [JavaScript SDK](https://near.github.io/near-sdk-js/)
