> For the complete documentation index, see [llms.txt](https://ratherlabs.gitbook.io/untitled/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ratherlabs.gitbook.io/untitled/quick-start/rust.md).

# Rust

Our implementation consists of two repositories: [NRC-721](https://github.com/rather-labs/nrc-721) and [NRC-721-template](https://github.com/rather-labs/nrc-721-template). The first one contains the base implementation of the type-script for a custom NFT. It also contains optional behaviors that can be added using a single line of code, increasing the capabilities of the NRC-721. The second repository contains a template for creating custom NFTs.

### Custom NFT creation procedure <a href="#f25f" id="f25f"></a>

In order to compile the custom NFT, it is necessary to have ckb-capsule installed and working.

Then the following steps will suffice to edit and build a new NFT.

First, we need to clone the NRC-721-template repository. Then, to define custom behavior we have two main points to introduce the desired logic. Editing the file contracts/custom\_nft/src/entry.rs, we find two sections marked through code comments.

**Composite script** section: allows defining a list of basic behaviors that we want our NFT to implement. In this section, we can choose from the basic behaviors available in the extensions module.

**Custom behavior** section: this section allows defining custom behaviors through Rust code.\
\
Once the behavior definition is completed we can build the typeScript using Capsule.

```bash
capsule build

```

The resulting script can be tested by a test included in the repository using capsule again.

```bash
capsule test

```

In order to use the script in production we must build it in release mode.

```bash
capsule build --release

```
