1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Fix run configuration docs

This commit is contained in:
Steffo 2024-08-19 08:13:12 +02:00
parent 4617d5ee3c
commit 74cefd5438
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
4 changed files with 8 additions and 19 deletions

View file

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Clippy" type="CargoCommandRunConfiguration" factoryName="Cargo Command" nameIsGenerated="true">
<configuration default="false" name="Clippy (none)" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Clippy">
<option name="command" value="clippy --package royalnet --bin royalnet --no-default-features" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />

View file

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Doc" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="doc --package royalnet --bin royalnet --no-default-features --document-private-items --open" />
<configuration default="false" name="Doc (all)" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Doc">
<option name="command" value="doc --package royalnet --bin royalnet --document-private-items --open" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />

View file

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run --package royalnet --bin royalnet --no-default-features" />
<configuration default="false" name="Run (telegram)" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Run">
<option name="command" value="run --package royalnet --bin royalnet --no-default-features --features interface_database,service_telegram" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs>
<env name="RUST_LOG" value="royalnet" />

View file

@ -115,25 +115,14 @@ The following features are currently available:
- `default`
- includes all features
[conditional compilation]: https://doc.rust-lang.org/reference/conditional-compilation.html
[Cargo features]: https://doc.rust-lang.org/cargo/reference/features.html
#### On RustRover
If you're editing the project with RustRover, you can graphically toggle features on and off:
1. Open `Cargo.toml`.
2. Scroll to the `[features]` section
3. Tick or untick the features you want to use.
- `default` is ignored if you use the provided run configurations.
#### Elsewhere
To toggle features on other editors, remember to pass the `--no-default-features` and `--features` option to Cargo when running commands:
```shell
cargo --no-default-features --features="interface_database,interface_stratz,service_telegram,service_brooch" run
```
[conditional compilation]: https://doc.rust-lang.org/reference/conditional-compilation.html
[Cargo features]: https://doc.rust-lang.org/cargo/reference/features.html
### Configuring PostgreSQL
> [!Note]