Skip to content

Commit

Permalink
Add the missing line so that the code matches what is generated by th…
Browse files Browse the repository at this point in the history
…e perseus new command.
  • Loading branch information
ngterry committed Aug 11, 2024
1 parent 7a8f9cb commit 3f474aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/0.4.x/en-US/first-app/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ This will create a new directory called `my-app/` that's equipped for a binary p
```toml
[build]
rustflags = [ "--cfg", "engine" ]
rustdocflags = [ "--cfg", "engine" ]
```

This will make sure your IDE builds your app correctly. Without this, you'll have red squiggly lines all over the place, because Perseus needs to be explicitly told if it's working on the engine-side (e.g. a server) or the browser-side, which are very different environments! Also, setting things up explicitly like this lets you change `engine` to `client` in that file when you want your IDE to help you out with working on browser-only code.
This will make sure your IDE builds your app correctly. Without this, you'll have red squiggly lines all over the place, because Perseus needs to be explicitly told if it's working on the engine-side (e.g. a server) or the browser-side, which are very different environments! Also, setting things up explicitly like this lets you change `engine` to `client` in that file when you want your IDE to help you out with working on browser-only code.

Next, put the following in your app's `Cargo.toml`:

Expand Down

0 comments on commit 3f474aa

Please sign in to comment.