Skip to content

Commit

Permalink
Update write-package.mdx (#21390)
Browse files Browse the repository at this point in the history
File is created by default

## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:

---------

Co-authored-by: Ronny Roland <ronmilton@mystenlabs.com>
  • Loading branch information
techdebt-99 and ronny-mysten authored Mar 1, 2025
1 parent e98fe17 commit f89030b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions docs/content/guides/developer/first-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ title: Your First Sui dApp
description: Build your first dApp and publish it on chain. These guides demonstrate the basics you need to know to start your development journey on Sui.
---

Before you can create your first dApp, you must have [Sui installed](./getting-started/sui-install.mdx).
Before you can create your first dApp on the Sui network, you must have [Sui installed](./getting-started/sui-install.mdx).

You use Move to write packages that live on chain, meaning they exist on the Sui network you publish them to. The instructions in this section walk you through writing a basic package, debugging and testing your code, and publishing. You need to follow these instructions in order to complete the exercise.
dApp stands for "decentralized application", which is an application that runs on a blockchain or decentralized network instead of a centralized server. Typical dApps do not run solely on the blockchain, but instead are composed of different pieces, like a TypeScript frontend that interacts with code that lives on a blockchain. Sui needs code written in Move for the pieces of a dApp that live on chain. These pieces are referred to as packages, modules, or smart contracts.

The instructions in this section walk you through writing a basic package, debugging and testing your code, and publishing. You need to follow these instructions in the order they appear to complete the exercise.

You use the `move` Sui CLI command for some instructions. The Sui CLI installs with the binaries, so you have it on your system if you follow the install instructions. To verify you have it installed, run the following command in a terminal or console.

Expand Down
8 changes: 2 additions & 6 deletions docs/content/guides/developer/first-app/write-package.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ The manifest file contents include available sections of the manifest and commen

### Defining the package

You have a package now but it doesn't do anything. To make your package useful, you must add logic contained in `.move` source files that define _modules_. Use a text editor or the command line to create your first package source file named `example.move` in the `sources` directory of the package:

```sh
$ touch my_first_package/sources/example.move
```
You have a package now but it doesn't do anything. To make your package useful, you must add logic contained in `.move` source files that define _modules_. The `sui move new` command creates a .move file in the `sources` directory that defaults to the same name as your project (`my_first_package.move` in this case). For the purpose of this guide, rename the file to `example.move` and open it with a text editor.

Populate the `example.move` file with the following code:

Expand All @@ -49,4 +45,4 @@ After you save the file, you have a complete Move package.

- [Build and Test Packages](./build-test.mdx): Continue this example to build and test your package to get it ready for publishing.
- [Sui Move CLI](../../../references/cli/move.mdx): Available Move commands the CLI provides.
- [Sui Move Book](https://move-book.com/): A comprehensive guide to the Move programming language and the Sui blockchain.
- [Sui Move Book](https://move-book.com/): A comprehensive guide to the Move programming language and the Sui blockchain.
5 changes: 5 additions & 0 deletions docs/content/guides/developer/getting-started/sui-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ The prerequisites needed for the macOS operating system include:
- CMake
- libpq (optional)
- Git CLI
- PostgreSQL

macOS includes a version of cURL you can use to install Homebrew. Use Homebrew to install other tools, including a newer version of cURL.

Expand Down Expand Up @@ -371,6 +372,10 @@ $ brew install git

After installing Git, download and install the [Git command line interface](https://git-scm.com/download/).

#### PostgreSQL

Visit the official [PostgreSQL website](https://wiki.postgresql.org/wiki/Main_Page) for instructions on downloading PostgreSQL.

</TabItem>

<TabItem value="win" label="Windows">
Expand Down

0 comments on commit f89030b

Please sign in to comment.