Giter Club home page Giter Club logo

nodus's Introduction

Nodus

A graphical logic gate simulator.

This project is in an early stage of development but most of the basic features are implemented.

Features

Choose from a variety of logic gates, input controls and output controls to build digital circuits using a drag and drop interface.

Simple Circuit

Gates Input controls Output controls
AND High const Light bulb
NAND Low const 7-Segment display
OR Toggle switch
NOR Clock
NOT
XOR

Logic Gate Selection

Insert components into the world using a radial context menu.

Context Menu

Save the circuits you've created in a .ron file and reload them later.

Simple Circuit

Getting started

Setup the Rust development environment and Bevy.

Installing Rust

Install Rust by following the Getting Started Guide.

Setting up Bevy

Follow this Guide to setup Bevy.

Run program

First clone the repository.

git clone https://github.com/r4gus/nodus.git

Then switch into the project folder and run the program.

cd nodus
cargo run

Known Issues

Here are some tips to solve known issues.

Note: Make sure you've installed all required dependencies (linux, windows).

Ubuntu linker error

If you get the following link error in Ubunut/ Debian,

= note: /usr/bin/ld: cannot find -lxcb-render
          /usr/bin/ld: cannot find -lxcb-shape
          /usr/bin/ld: cannot find -lxcb-xfixes
          collect2: error: ld returned 1 exit status

try to install libxcb-shape0-dev and libxcb-xfixes0-dev separately, i.e. sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev.

AMD driver issue

If you get the following runtime error,

thread 'main' panicked at 'Failed to acquire next swap chain texture!: Timeout', /home/USERNAME/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.6.0/src/view/window.rs:161:24

you can either try to disable vsync in src/main.rs, or switch from AMDVLK to RADV: AMD_VULKAN_ICD=RADV cargo run (maybe this can help).

Controls

  • lmb pressed: select/ drag (selection mode - s), pan (pan mode - p)
  • rmb pressed: open context menu
  • mouse wheel: zoom

Planned Features

  • Create new logic components from existing circuits
  • Create truth tables from circuits

Credits

nodus's People

Contributors

dependabot[bot] avatar r4gus avatar zesterer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nodus's Issues

Cannot run the main executable

Describe the bug
I just cloned the repo to my local machine (Arch Linux) and I cannot run the main executable with Cargo.

To Reproduce
Steps to reproduce the behavior:

  1. Run git clone ...
  2. Run cargo run or cargo run --release
  3. See error below

Expected behavior
Expected the window to not close.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux (Arch Linux) with X11
  • main branch

Additional context
output of cargo run --release (warnings skipped):

    Finished release [optimized] target(s) in 2m 41s
     Running `target/release/nodus`
2022-02-17T12:49:44.244920Z  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
2022-02-17T12:49:44.302552Z  INFO bevy_render::renderer: AdapterInfo { name: "Unknown AMD GPU", vendor: 4098, device: 5708, device_type: IntegratedGpu, backend: Vulkan }
2022-02-17T12:49:44.674380Z  INFO nodus::gate: NodePlugin loaded
thread 'main' panicked at 'Failed to acquire next swap chain texture!: Timeout', /home/USERNAME/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.6.0/src/view/window.rs:161:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failed to run custom build command for `wayland-sys v0.29.4` on linux mint

Hello, i can not compile , i have intel microprocesseur with nvidia graphic card on linux mint.

i also tried this :
sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev
i have already most recent packets.

here is the error message:
...
Compiling lewton v0.10.2
error: failed to run custom build command for wayland-sys v0.29.4

Caused by:
process didn't exit successfully: /media/USERNAME/mydisk/myfolder/nodus-main/target/debug/build/wayland-sys-8c33ab3da59f0eaf/build-script-build (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=WAYLAND_CLIENT_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=WAYLAND_CLIENT_STATIC
cargo:rerun-if-env-changed=WAYLAND_CLIENT_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: "pkg-config" "--libs" "--cflags" "wayland-client" did not exit successfully: exit status: 1
error: could not find system library 'wayland-client' required by the 'wayland-sys' crate

--- stderr
Package wayland-client was not found in the pkg-config search path.
Perhaps you should add the directory containing wayland-client.pc' to the PKG_CONFIG_PATH environment variable No package 'wayland-client' found ', /home/USERNAME/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-sys-0.29.4/build.rs:10:47 note: run with RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

=============== > FIX
in [dependencies] just add this line:
winit = "0.26.1"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.