Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jozanza committed Jan 18, 2024
1 parent bbe2e4b commit c5a2b62
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 21 deletions.
74 changes: 56 additions & 18 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ First, install Rust if it's not already on your system:

<!-- tabs:start -->

#### **macOS / Linux**
#### **MacOS / Linux**

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Expand All @@ -20,9 +20,13 @@ Or follow the instructions at https://www.rust-lang.org/tools/install

#### **Windows**

Follow the **Recommended** instructions using `rustup` at https://www.rust-lang.org/tools/install
**MSVC**

For a typical setup, follow the **Recommended** instructions using `rustup` at https://www.rust-lang.org/tools/install

!> `turbo-cli` cannot open a window in Windows Subsystem for Linux at the moment due to some quirks of the Wayland display server protocol it uses.
**WSL**

For a Windows Linux Subsystem environment, follow the instructions for MacOS / Linux.

<!-- tabs:end -->

Expand All @@ -40,34 +44,34 @@ cargo install cargo-watch

### Turbo CLI

Now that our dependencies installed, let's also install `turbo-cli`:
Now that our dependencies installed, let's also install `turbo`:

<!-- tabs:start -->

#### **macOS / Linux**

Install `turbo-cli` by running this script:
Install `turbo` by running this script:

```bash
sh -c "$(curl -sSfL https://turbo.computer/install.sh)"
```

?> The installer will ask for your password to place the command in `/usr/local/bin`. If you don't want to do this, you can manually download the 64-bit releases and move them to a directory in your `PATH`: [Mac OS ARM](https://turbo.computer/bin/aarch64-apple-darwin/turbo-cli), [Linux x86](https://turbo.computer/bin/x86_64-unknown-linux-gnu/turbo-cli)
?> The installer will ask for your password to place the command in `/usr/local/bin`. If you don't want to do this, you can manually download the 64-bit releases and move them to a directory in your `PATH`: [Mac OS ARM](https://turbo.computer/bin/aarch64-apple-darwin/turbo), [Linux x86](https://turbo.computer/bin/x86_64-unknown-linux-gnu/turbo)
<br /><br />
If you need a binary for another platform, contact [Turbo](https://twitter.com/makegamesfast) on Twitter.

Verify the installation with:

```bash
turbo-cli -h
turbo -h
```

If successful, you'll see `turbo-cli`'s help documentation:
If successful, you'll see `turbo`'s help documentation:

```bash
Run Turbo games natively on desktop

Usage: turbo-cli <COMMAND>
Usage: turbo <COMMAND>

Commands:
init Initializes a new Turbo project in Rust
Expand All @@ -82,24 +86,58 @@ Options:

#### **Windows**

1. Download the 64-bit release for [Windows x86](https://turbo.computer/bin/x86_64-pc-windows-msvc/turbo-cli.exe.zip)
2. If it doesn't already exist, create a folder at `C:\Users\YOUR_USERNAME\bin`
3. Unzip the file and move `turbo-cli.exe` into that folder
Follow these steps to install `turbo` on Windows:

1. Download the 64-bit release for [Windows MSVC](https://turbo.computer/bin/turbo-0.2.0-x86_64-pc-windows-msvc/turbo.exe.zip).
2. If it doesn't already exist, create a folder at `C:\Users\YOUR_USERNAME\bin`.
3. Unzip the file and move `turbo.exe` into that folder.

Make sure you have [Git for Windows](https://git-scm.com/download/win) installed.

**Open Git Bash**. Verify the installation with:

```bash
turbo-cli -h
turbo -h
```

If successful, you'll see `turbo`'s help documentation:

```bash
Run Turbo games natively on desktop

Usage: turbo.exe <COMMAND>

Commands:
init Initializes a new Turbo project in Rust
run Runs a Rust Turbo project
help Print this message or the help of the given subcommand(s)

Options:
-v, --version Print version
-h, --help Print help
-V, --version Print version
```

#### **Windows (WSL)**

Follow these steps to install `turbo` on Windows Linux Subsystem (WSL):

1. Download the 64-bit release for [Windows Linux Subsystem](https://turbo.computer/bin/turbo-0.2.0-x86_64-pc-windows-gnu/turbo.exe.zip).
2. Unzip the file and move `turbo.exe` into that folder.
3. Copy the `turbo.exe` command to `/usr/local/bin`.

In your WSL shell, verify the installation with:

```bash
turbo -h
```

If successful, you'll see `turbo-cli`'s help documentation:
If successful, you'll see `turbo`'s help documentation:

```bash
Run Turbo games natively on desktop

Usage: turbo-cli.exe <COMMAND>
Usage: turbo.exe <COMMAND>

Commands:
init Initializes a new Turbo project in Rust
Expand All @@ -118,14 +156,14 @@ Options:

## Development

?> Windows users should always run `turbo-cli` in Git Bash.
?> Windows users should always run `turbo` in Git Bash.

### Creating a Game

Begin by creating a new project called "hello-world":

```
turbo-cli init hello-world
turbo init hello-world
```

This initializes a rust crate in a `hello-world` directory. Open it in your preferred editor.
Expand All @@ -136,7 +174,7 @@ This initializes a rust crate in a `hello-world` directory. Open it in your pref
To view your game, run the following command at the root of the project directory:

```
turbo-cli run -w .
turbo run -w .
```
?> The `-w` flag auto-refreshes your game window as you code. Just be sure to watch the console for compiler errors.

Expand Down
6 changes: 3 additions & 3 deletions docs/recipes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Deploying

`turbo-cli` doesn't have a built-in commands for bundling/deploying your game yet.
`turbo` doesn't have a built-in commands for bundling/deploying your game yet.

However, you can follow these instructions to turn your Turbo game into a PWA:

Expand Down Expand Up @@ -52,10 +52,10 @@ turbo::cfg!{r#"

#### 3. Set the user

When running `turbo-cli`, you will need to specify the private key of the user via a `TURBO_SOL_USER` env var:
When running `turbo`, you will need to specify the private key of the user via a `TURBO_SOL_USER` env var:

```bash
TURBO_SOL_USER=<insert base58 private key> turbo-cli run -w path/to/my/project
TURBO_SOL_USER=<insert base58 private key> turbo run -w path/to/my/project
```

?> You may also set a `TURBO_SOL_PAYER` private key as well if you wish for the payer to be different than the user.
Expand Down

0 comments on commit c5a2b62

Please sign in to comment.