Skip to content

Commit 165f22f

Browse files
committed
Stub new files and improve installation page
1 parent b4a7a7b commit 165f22f

File tree

7 files changed

+104
-69
lines changed

7 files changed

+104
-69
lines changed

docs/bindings.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
slug: /bindings
3+
---
4+
5+
# Bindings

docs/constants.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
slug: /constants
3+
---
4+
5+
# Constants

docs/functions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
slug: /functions
3+
---
4+
5+
# Functions

docs/getting-started/hello-world.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/getting-started/installation.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/installation.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
slug: /installation
3+
---
4+
5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
7+
8+
# Installation
9+
10+
:::warning
11+
Rue is currently in alpha. Please use it with caution and report any bugs you find in doing so.
12+
:::
13+
14+
First, you will need to install the [Rust toolchain](https://rustup.rs).
15+
16+
You can install the Rue CLI with this command:
17+
18+
```bash
19+
cargo install rue-cli
20+
```
21+
22+
It's also useful to install [clvm_tools_rs](https://github.com/Chia-Network/clvm_tools_rs):
23+
24+
```bash
25+
cargo install clvm_tools_rs
26+
```
27+
28+
## Editor Support
29+
30+
<Tabs>
31+
<TabItem value="vscode" label="VSCode" default>
32+
33+
You will need to install [Visual Studio Code](https://code.visualstudio.com).
34+
35+
Then, you can install the [Rue extension](https://marketplace.visualstudio.com/items?itemName=Rigidity.rue-language) on the VSCode marketplace. It provides syntax highlighting and LSP integration.
36+
37+
You can install the Rue language server with this command:
38+
39+
```bash
40+
cargo install rue-lsp
41+
```
42+
43+
This should automatically work with the extension.
44+
45+
</TabItem>
46+
<TabItem value="cursor" label="Cursor">
47+
48+
You will need to install [Cursor](https://cursor.com/).
49+
50+
Then, you can install the [Rue extension](https://open-vsx.org/extension/Rigidity/rue-language) on the Open VSX marketplace. It provides syntax highlighting and LSP integration.
51+
52+
You can install the Rue language server with this command:
53+
54+
```bash
55+
cargo install rue-lsp
56+
```
57+
58+
This should automatically work with the extension.
59+
60+
</TabItem>
61+
</Tabs>
62+
63+
:::tip
64+
Any editor that supports Open VSX and VSCode extensions will likely support this.
65+
:::
66+
67+
## Hello World
68+
69+
The simplest example of a program in Rue is the classic hello world example.
70+
71+
Write the following program in a file named `hello.rue`:
72+
73+
```rue title="hello.rue"
74+
fn main() -> Bytes {
75+
"Hello, world!"
76+
}
77+
```
78+
79+
Now, run the following command to run the file:
80+
81+
```bash
82+
rue build hello.rue
83+
```
84+
85+
The output should be `(q . "Hello, world!)"`, which when run with CLVM outputs the string on its own.

sidebars.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
22

33
const sidebars: SidebarsConfig = {
44
docs: [
5-
{
6-
type: "category",
7-
label: "Getting Started",
8-
items: ["getting-started/installation", "getting-started/hello-world"],
9-
collapsed: false,
10-
},
5+
"installation",
6+
"functions",
7+
"bindings",
8+
"constants",
119
{
1210
type: "category",
1311
label: "Type System",
@@ -19,7 +17,6 @@ const sidebars: SidebarsConfig = {
1917
"type-system/unions",
2018
"type-system/guards",
2119
],
22-
collapsed: false,
2320
},
2421
"security",
2522
],

0 commit comments

Comments
 (0)