Contributions to LogicRs are very welcome. For major changes, please open an issue first to discuss what you would like to change.
Following are instructions, hints and guidelines how contributions should be worked on.
The code is structures into three main folders:
content
contains XML-style.ui
-files which lay out key components of the GTK UI frontend.src
contains all rust source code for the application.style
contains css-files used for the styling of the application.
Building LogicRs is done via Cargo. On UNIX, dependencies should be managed either directly by Cargo or your distribution's package manager. On Windows, a special build environment like MSYS64/MINGW64 is required.
Successfully built executables will be put into the target/
directory.
This is an example workflow showing how contributions can be done. Since git is very flexible, there are many ways how this can be achieved.
(If you don't already have a GitHub account, please create one. Your GitHub username will be referred to later as 'YOUR_GITHUB_USERNAME'. Change it accordingly in the steps below.)
-
Fork https://github.com/spydr06/logicrs using GitHub's interface to your own account. Let's say that the forked repository is at
https://github.com/YOUR_GITHUB_USERNAME/logicrs
. -
Clone the main LogcRs repository https://github.com/spydr06/logicrs to a local folder on your computer, say named
logicrs-dev/
(git clone https://github.com/spydr06/logicrs logicrs-dev
) -
cd logicrs-dev
-
git remote add pullrequest https://github.com/YOUR_GITHUB_USERNAME/logicrs
the remote named
pullrequest
should point to YOUR own forked repo, not the main CSpydr repository! After this, your local cloned repository is prepared for making pullrequests, and you can just do normal git operations such as:git pull
git status
and so on.
-
When finished with a feature/bugfix/change, you can:
git checkout -b fix_<your thing>
- Don't forget to keep formatting standards before committing
-
git push pullrequest
# (NOTE: thepullrequest
remote was setup on step 4) -
On GitHub's web interface, go to: https://github.com/spydr06/logicrs/pulls
Here the UI shows a dialog with a button to make a new pull request based on the new pushed branch.
-
After making your pullrequest (aka, PR), you can continue to work on the branch
fix_<your thing>
... just do againgit push pullrequest
when you have more commits. -
If there are merge conflicts, or a branch lags too much behind V's main, you can do the following:
git pull --rebase origin main
# solve conflicts and dogit rebase --continue
git push pullrequest -f
# this will overwrite your current remote branch with the updated version of your changes.
The point of doing the above steps, is to never directly push to the main LogicRs repository, only to your own fork. Since your local main
branch tracks the
main LogicRs repository's main, then git checkout main
, as well as
git pull --rebase origin main
will continue to work as expected