Updated docs

This commit is contained in:
2026-05-19 15:33:24 +02:00
parent 137a8e2474
commit e01a40e47f
2 changed files with 21 additions and 6 deletions
+18 -6
View File
@@ -11,7 +11,7 @@ Mist is currently distributed as a Cargo crate. To get started, you'll need to h
Run the following command to install the Mist compiler:
```bash title="Terminal"
cargo install [email protected].2-alpha0
cargo install [email protected].3-alpha4
```
Once the installation finishes, verify it by checking the version:
@@ -52,11 +52,24 @@ Since Mist compiles down to Rust, you need to point Cargo to the generated outpu
```toml title="Cargo.toml"
[[bin]]
name = "main"
name = "my-mist-app"
path = "build/main.rs"
```
> **Pro Tip:** You’ll probably want to add `/build` to your `.gitignore` file to keep your repository clean!
You can also add `/build` to your `.gitignore`.
> **Pro Tip:** create a `src/_header.rs` file with only main declared, and add this to your `Cargo.toml` (without replacing the current `[[bin]]`):
> ```toml title="Cargo.toml"
> # add this in [package]
> default-run="my-mist-app-header"
>
> # Do not replace the current [[bin]]
> [[bin]]
> name = "my-mist-app-header"
> path = "src/_header.rs"
>```
>
> And add all of the `mod`(s) from `src/main.rs`, as well as a empty `main` function, this will allow `.rs` files to be used with IDE support.
---
@@ -78,9 +91,7 @@ To turn your Mist code into an executable, use the `run` command:
mist run
```
> **Pro Tip:** If you encounter any rust errors, head to the build directory and analyze the output, if you see anything unusual in the output, report the issue at https://github.com/mist-go/mist
Or if you only want to transpile to rust
Or if you only want to transpile to rust (this will not give any semantic errors, only syntax errors).
```bash title="Terminal"
mist transpile
@@ -96,5 +107,6 @@ mist transpile
| `mist run` | Runs the project in the current directory |
| `mist build` | builds the project in the current directory |
| `mist transpile` | transpiles the project in the current directory |
| `mist check` | checks the project in the current directory |
| `mist version` | prints the compiler version |
| `mist help` | prints this message |
+3
View File
@@ -32,6 +32,9 @@ match (task_state) {
TaskState::Failed { reason, code } => {
println!("Error {}: {}", code, reason);
}
TaskState::NotResponding | TaskState::Progress => {
draw_loading();
}
_ => {
println!("Other state");
}