mirror of https://codeberg.org/topola/topola.git
cargo: toggle `disable_contracts` feature on by default
This commit is contained in:
parent
08c444d16d
commit
925e3d5266
|
|
@ -64,11 +64,11 @@ Change your working directory to your clone of Topola's repository:
|
|||
|
||||
Build the project with
|
||||
|
||||
cargo build --features "egui,disable_contracts" --bin topola-egui
|
||||
cargo build --features egui --bin topola-egui
|
||||
|
||||
Finally, run Topola by executing
|
||||
|
||||
cargo run --features "egui,disable_contracts" --bin topola-egui
|
||||
cargo run --features egui --bin topola-egui
|
||||
|
||||
##### Running Topola in a Web browser
|
||||
|
||||
|
|
@ -92,13 +92,12 @@ of the Egui port:
|
|||
|
||||
The downside is that the SDL2 demo's user interface is highly incomplete.
|
||||
|
||||
|
||||
#### Automated tests
|
||||
|
||||
Topola has automated tests to make sure its basic functionalities work.
|
||||
To execute these, run
|
||||
|
||||
cargo test --features disable_contracts
|
||||
cargo test
|
||||
|
||||
#### Contracts
|
||||
|
||||
|
|
@ -130,7 +129,13 @@ You can go back to stable with
|
|||
|
||||
##### Enabling contracts
|
||||
|
||||
To enable contracts, simply remove the `disable_contracts` feature from
|
||||
commands. For example, to build tests with contracts, simply run
|
||||
To enable contracts, simply add a `--no-default-features` switch. This
|
||||
switches off a default feature that prevents contracts from executing.
|
||||
For example, to build tests with contracts, simply run
|
||||
|
||||
cargo test
|
||||
cargo test --no-default-features
|
||||
|
||||
Of course, you can enable contracts for any build target. For example,
|
||||
the following command will build the Egui port with contracts enabled:
|
||||
|
||||
cargo build --features egui --bin topola-egui --no-default-features
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ name = "topola-sdl2-demo"
|
|||
required-features = ["sdl2"]
|
||||
|
||||
[features]
|
||||
default = ["disable_contracts"]
|
||||
cli = ["dep:clap"]
|
||||
egui = ["dep:eframe", "dep:egui", "dep:rfd", "dep:futures"]
|
||||
sdl2 = ["dep:sdl2", "dep:gl", "dep:pathfinder_canvas", "dep:pathfinder_geometry", "dep:pathfinder_gl", "dep:pathfinder_renderer", "dep:pathfinder_resources"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue