BSim2 is a simulator for logical circuits, written in Rust using Bevy. This is based on BSim.
For compiling and running a dev build, use the standard cargo
cli, with the dev
feature enabled:
cargo run
For compiling a release build, use:
cargo build --release --no-default-features
By default the dev
feature is enabled, which is used to enable Bevys dynamic-linking
and file-watcher
feature.
For releases the dynamic-linking
is not recommended as it require shipping an additional library,
and the file-watcher
feature is useless on release builds, and infact won't even compile for WASM-builds.
For building the web version, use:
trunk build --release --no-default-features
or
trunk build --release --no-default-features
to build it and start a webserver running it. Make sure you have trunk installed, which is available through
cargo install --locked trunk
./assets
contains images and gltf scene files (.glb
) used within the program../build
contains extra files for compiling the project to the different targets../dist
is the target folder for the web build../gates.blend
is a blender file containing the meshes for the logic gates.
The rest of the files are like the usual cargo project structure.