[Docs] Stylus dev workflow (#7060)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces documentation and assets for integrating thirdweb tools into the Stylus contract development workflow, specifically for Rust. It includes setup instructions, publishing and deployment commands, and images to enhance the documentation.

### Detailed summary
- Added new sections in `page.mdx` for Arbitrum Stylus.
- Included prerequisites for Rust and Solidity installations.
- Provided setup commands for creating a Stylus project.
- Added commands for publishing and deploying Stylus contracts.
- Included images (`stylus-publish-page.png`, `stylus-deploy-page.png`) to illustrate the process.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
This commit is contained in:
kumaryash90
2025-05-15 21:30:32 +00:00
parent db538473cf
commit 4a8adc143f
4 changed files with 71 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

@@ -0,0 +1,66 @@
import { DocImage } from "@doc";
import { Tabs, TabsList, TabsContent } from "@/components/ui/tabs";
import stylusPublishPage from "./assets/stylus-publish-page.png";
import stylusDeployPage from "./assets/stylus-deploy-page.png";
# Arbitrum Stylus
Integrate thirdweb tools in Stylus contract (Rust) development workflow.
Use thirdweb CLI to create, publish, and deploy contracts written with Stylus. The deployed contracts can be used via thirdweb dashboard or SDK.
## Prerequisites
- Rust toolchain should be installed (https://www.rust-lang.org/tools/install)
- Solidity (solc) should be installed (https://docs.soliditylang.org/en/latest/installing-solidity.html)
You can also use the Stylus quickstart guide for reference: https://docs.arbitrum.io/stylus/quickstart
## Getting started
To get started, setup a starter repo (can be skipped if you already have a Stylus project):
<Tabs defaultValue="forge">
<TabsContent value="forge">
```bash
npx thirdweb create-stylus
```
</TabsContent>
</Tabs>
This will setup a project containing a template contract.
## Publishing and Deploying
Use one of these commands to publish or deploy your Stylus contract.
<Tabs defaultValue="forge">
<TabsContent value="forge">
```bash
npx thirdweb publish-stylus -k <YOUR SECRET KEY>
```
</TabsContent>
</Tabs>
OR
<Tabs defaultValue="forge">
<TabsContent value="forge">
```bash
npx thirdweb deploy-stylus -k <YOUR SECRET KEY>
```
</TabsContent>
</Tabs>
Publishing a contract saves the contract metadata to an onchain registry, and creates a contract page from where you can deploy a specific version of this contract multiple times.
This is what you should see:
<DocImage src={stylusPublishPage} />
After deployment, the contract will be available on thirdweb dashboard. You can interact with it via dashboard or integrate it in your app using the code snippets as shown below:
<DocImage src={stylusDeployPage} />
More templates for Stylus Rust contracts and use-case specific installable modules are coming soon.
@@ -799,6 +799,11 @@ export const sidebar: SideBar = {
},
],
},
// stylus
{
name: "Arbitrum Stylus",
href: `${buildSlug}/stylus`,
},
],
},
{ separator: true },