Updated docs
This commit is contained in:
+18
-6
@@ -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:
|
Run the following command to install the Mist compiler:
|
||||||
|
|
||||||
```bash title="Terminal"
|
```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:
|
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"
|
```toml title="Cargo.toml"
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "main"
|
name = "my-mist-app"
|
||||||
path = "build/main.rs"
|
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
|
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 (this will not give any semantic errors, only syntax errors).
|
||||||
|
|
||||||
Or if you only want to transpile to rust
|
|
||||||
|
|
||||||
```bash title="Terminal"
|
```bash title="Terminal"
|
||||||
mist transpile
|
mist transpile
|
||||||
@@ -96,5 +107,6 @@ mist transpile
|
|||||||
| `mist run` | Runs the project in the current directory |
|
| `mist run` | Runs the project in the current directory |
|
||||||
| `mist build` | builds 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 transpile` | transpiles the project in the current directory |
|
||||||
|
| `mist check` | checks the project in the current directory |
|
||||||
| `mist version` | prints the compiler version |
|
| `mist version` | prints the compiler version |
|
||||||
| `mist help` | prints this message |
|
| `mist help` | prints this message |
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ match (task_state) {
|
|||||||
TaskState::Failed { reason, code } => {
|
TaskState::Failed { reason, code } => {
|
||||||
println!("Error {}: {}", code, reason);
|
println!("Error {}: {}", code, reason);
|
||||||
}
|
}
|
||||||
|
TaskState::NotResponding | TaskState::Progress => {
|
||||||
|
draw_loading();
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
println!("Other state");
|
println!("Other state");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user