An easy to use command line project manager for projects using the ReCT programming language

Overview

☢️ A powerful project manager for the ReCT programming language! ☢️

ReCTx makes your projects easier to manage by allowing you to configure everything in an easy to navigate config file! Currently, ReCT has multiple compilers, packaging systems, and tools that may be intimidating for even an advanced user. We've made everything to do with ReCT projects managable under a single easy to use and well documented system!

Features

  • Project creation: Create new projects with generated directories and files using a simple command!
  • Easily build and run projects: Building/Running projects is as easy as rectx build/rectx run!

Installation

Build from source

To build from source you will need cargo installed. Cargo will be installed a long side the Rust programming language (installation details are provided on the official website).

To get started, first clone the project from GitHub and change directory to the project:

git clone https://github.com/hrszpuk/rectx.git && cd rectx

From here, use cargo to build the project in release mode:

cargo build --release

The executable (named rectx) will be generated within ./target/release. You can move the executable into an installation path such as /usr/local/bin or your own directory which is on the PATH.

sudo mv ./target/release/rectx /usr/local/bin

Usage

Creating new projects

To create a new project using rectx, use the new command as shown below.

rectx new "project-name"

This will generate a folder with the name "project-name". The project directory will contain a README.md with a title of the same name as the directory, a .gitignore file, and a /src directory which houses a main.rct. The main.rct file will contain a simple hello world program.

Building a project

Ensure you are within the project directory and run the command shown below.

rectx build

This will build the source file main.rct in /src into an exectuable called main. You can find main in /src and run it using ./src/main

Running a project

While you're in the project directory you can run the rectx run command shown below.

rectx run

This will build the soruce file main.rct in /src into an exectuable called main. This command will also run the executable, you should be able to see any output in the console.

Comments
  • Config file enhancement (config.toml project file)

    Config file enhancement (config.toml project file)

    Project files: config.toml

    ReCTx will generate several files and directories on project creation. Currently, it will generate a src directory storing a main.rct, and a REAADME.md. Currently the project's generated by ReCTx have no form of configuration (customisation)...

    The config.toml

    As you can probably guess, the config.toml file aims to store configuration settings, project information, etc... The config file will be generated by rectx new along with the other generated files and directories. The ReCT programmer can then modify the config file which will be read by rectx during building and running do customise how they want rectx to perform certain tasks.

    An example of how the config file could look:

    [project]
    # For storing project information
    name = "example-project"
    version = "0.1.0"
    authors = ["user"]
    remote = "github.com/user/example-project"
    
    [profile.build]
    # For storing build information (for rectx build)
    compiler = "rgoc"
    compiler.flags = ["-xx", "-O2"]
    output.name = "program"
    output.dir = "target/"
    source.dir = "src/"
    source.main = "main.rct"
    
    [profile.run]
    # For storing run information (for rectx run)
    compiler = "rctc"
    compiler.flags = ["--example-flag"]
    output.name = "program"
    output.dir = "target/"
    source.dir = "src/"
    source.main = "main.rct"
    

    Benefits of a config.toml file

    This would allow for a lot of customisation on how ReCT programmers would like their programs to compile/run. This also keeps everything in one place and could be committed to repositories allowing for easy compilation by collaborators (instead of having to explain how to compile, people will be able to just do rectx build!).

    A config file also has wide-scale expand-ability! It would be very easy to add a new benchmark profile or custom profiles with something like rectx run custom-profile-name (this of course being a completely custom way for the user build/run their programs). Not to mention the example provided above is only an example of what could be possible, more fields and options could definitely be added.

    documentation enhancement help wanted good first issue 
    opened by hrszpuk 5
  • Better/nicer help menu

    Better/nicer help menu

    New help menu

    Current help menu is a bit tacky, I think it would be better if the help menu looked closer to rgoc's help menu. An example (NOT FINAL) is shown below.

    ---------------------
    ReCTx Project Manager
    --------Help---------
    Usage: rectx <command>
    Commands:
        help    | Shows this help message
        new     | Creates a new project
        build   | Builds the current project
        run     | Runs the current project
    
    For more information check the GitHub page: <link>
    Or join the Discord: <link>
    

    Sub-menus

    Every command should have a help menu as well, for example rectx help run or rectx help new which says more information about the command.

    Colours

    Use the colored cargo package to add colour to the help menu.

    documentation enhancement good first issue 
    opened by hrszpuk 3
  • Generating compilation directories,  and dependency management

    Generating compilation directories, and dependency management

    Generating directories

    Directory generation is usually handled by the manager module. In this case, a target/ directory should be generated with the executable of the correct name inside. Each compilation profile, currently only run and build, should generate their own directory target/run/ and target/build/ respectfully. This will involve modifying manager::generate_project_executable().

    In addition to the target/ directory a deps/ (for storing dependencies or files that are needed at runtime) should be generated during project creation (i.e. rectx new project-name). Any files inside the deps/ directory should be copied into the target/build//target/run/.

    Milestone reference (#1)

    This is the last feature needed for the v1.0.0 milestone to be complete and is referenced on the v1.0.0 section as "Add target/" and "Add /deps".

    Tasks

    • [x] Generate deps/ during manager::generate_project_directory()
    • [x] Generate target/ during manager::generate_project_executable()
      • [x] Generate target/
      • [x] Generate correct compilation profile directory
      • [x] Compile program into target/{run/build}
    • [x] Copy dependencies from deps/ into target/{run/build}
    enhancement good first issue manager module 
    opened by hrszpuk 3
  • Add cross-platform support

    Add cross-platform support

    Dear Remy.

    I can see that you only have support with UNIX-like systems. One good idea is to use cross-platform support from the start. I have seen lines of codes such as:

    https://github.com/hrszpuk/rectx/blob/master/src/manager.rs#L82-L84

    that won't work in a Windows Operating System (Since they use the Inteligent\Path\main.rct). One option is to use the rust's built-in function std::path::join function.

    here are some examples: https://stackoverflow.com/questions/67816016/how-to-get-path-join-in-rust

    Have a good day 👍🏽

    bug enhancement help wanted good first issue 
    opened by mauro-balades 2
  • Target profiles, directory generation, and automatically moving dependencies when needed

    Target profiles, directory generation, and automatically moving dependencies when needed

    Issue

    Each build profile should have their own target folder as each build profile can have different settings. Furthermore, the application being build may require files/folders at runtime, these can be moved from /deps (default) to the build profile target directory so the application has direct access to them when it is being ran.

    Solution

    The implementation currently is not very flexible, although this should change when the compilation profile code is refactored in the near future. Below is a list of the features implemented.

    1. build/run can be built into /target/{build|run} (default)
    2. Dependencies in /deps (default) are copied into /target/{build|run}

    Notes about the implementation

    Currently the entire /deps folder is copied. This should be changed to only copy files/folders inside the /deps.

    enhancement manager module 
    opened by hrszpuk 1
  • Error handling refactor

    Error handling refactor

    Current error handling problem

    Current error handling has been minimal as the project is in early development. Right now, errors are just printed to the user which isn't very user friendly as many of these messages are hard to read, or aren't understandable to people know aren't knowledgeable on Rust.

    Solution

    To make errors better, the CLI should support a function that can send errors to the user, then each module can report errors through the CLI. Error handling should match on different error to detect what type of errors have occurred and relay why to the user. Error messages should convey the actual error at hand (PermissionError, FileNotFound, etc) and then suggest a reason why (assumptions can be made for this).

    Error tags

    I suggest three error tags: ERROR, ISSUE, ABORT. Each of these has varying serverity: ISSUE; for small issues that the program should be able to recover from, ERROR; when something does not go right and may or may not be recoverable, ABORT; when an issue isn't recoverable and the program is going to exit.

    Example:

    [ISSUE] A FileNotFoundError occurred in the Config module, maybe a "config.toml" does not exist?
    
    bug enhancement 
    opened by hrszpuk 1
  • Major improvements to the help menu (colours, detail, commands, etc)

    Major improvements to the help menu (colours, detail, commands, etc)

    Improvements to the help menu (master <- develop)

    List of improvements made

    • [x] Style of help menu more resembles rgoc
    • [x] Help menu now has command examples
    • [x] Help menu now has links to GitHub page, and Discord server
    • [x] Help menu now has colours
    • [x] Each command has it's own detailed help menu
      • [x] Accessible through rectx help <command>
      • [x] Detailed description of what the command does
      • [x] Example of the command's usage

    Issues

    • #21
    • #1
    enhancement cli module 
    opened by hrszpuk 0
  • Improvements to the help menu (+colours)

    Improvements to the help menu (+colours)

    Improvements made

    Issues with the original help menu

    The original help menu (the help menu that is currently used in the master branch as of the time of this commit) is rather ugly and does not help the user understand what each command does.

    Original help menu for reference:

    ReCTx :: Help Menu
    
    Usage: rectx <command> [options]
    
    Commands:
      help          -> shows this menu
      new [name]    -> creates a new project
      run           -> runs the current project
      build         -> builds the current project
    
    For more information visit the GitHub page: https://github.com/hrszpuk/rectx
    

    The brief description given for each command is very basic, in fact, you gather about has much information from the command name itself as the description give you (e.g. "run" obviously runs the project code). Furthermore, the information is not coloured whatsoever which can make it head to read, and hard to pick out important information.

    In the original help menu, only one command has a more detail explanation...

    Original help menu for the new command:

    ReCTx :: Help Menu :: "new"
    
    Usage: rectx new project-name
    
    This command will create a new ReCT project with the name provided.
    The project will contain: /src/main.rs, README.md, and config.toml!
    
    For more information visit the GitHub page: https://github.com/hrszpuk/rectx
    

    The information is still brief and does not highlight the important information. The information in this help menu is also outdated. Other commands such as 'build' and 'run' do not have their own help menu which, despite not the commands name being self-explanatory, leaves more specific information about the commands (such as configuration with config.toml) unknown to the user.

    The new help menu

    The new help menu aims to use colours to highlight more important information, and provide a way for users to see more information about a command.

    The help command (rectx help) can now accept a <command> argument for the command the user wishes to understand more. Examples: rectx help new rectx help build rectx help run

    documentation enhancement cli module 
    opened by hrszpuk 0
  • v1.0.0 Complete

    v1.0.0 Complete

    v1.0.0 complete (master <- develop)

    This pull completes the features of v1.0.0 described in #1.

    Issues

    • #7
    • #6
    • #5
    • #4

    Pull Requests

    • #16
    • #15
    • #17
    • #18
    enhancement 
    opened by hrszpuk 0
  • Cross-platform support for Windows

    Cross-platform support for Windows

    Issue

    The original issue was outlined by Mauro in #14. To put it simply, many of the paths used in the code were for Unix platforms only (using / between items in the path).

    Solution

    Instead of using format! to create paths with /, I've used std::path::Path. This should relieve any cross-platform issues related to paths. In some instances where std::path::Path was not viable, I have used std::env::const::OS and format! to create the correct path.

    enhancement config module manager module 
    opened by hrszpuk 0
  • target/ and deps/ are now in [project] header (config.toml)

    target/ and deps/ are now in [project] header (config.toml)

    Moved where these properties are stored based on the fact I think it makes more sense for them to be overall for the project rather than based on build/run profiles.

    enhancement config module 
    opened by hrszpuk 0
  • "rectx run" does not account for RCTC .dll generation

    Issue

    rectx run will try to run an executable generated by the compiler. However, if the compiler is rctc it will not generate an executable but instead generate a .dll which has to be ran with a separate command dotnet file.dll (reference).

    Solution

    Detect which compiler is being used and use the correct command to run the executable. This should be a simple fix in manager::generate_project_executable.

    bug good first issue 
    opened by hrszpuk 2
  • ReCTx's configuration file

    ReCTx's configuration file

    ReCTx's own config file?!

    I would like ReCTx to remember some information about the user, the projects the user is developing, as well as information that may be useful to store. In order to do this, rectx will have to have it's own config file to manage. This will probably done within a new module called internal as I would like to keep user config logic separate from rectx config logic.

    Where to store?

    On Linux/FreeBSD/, the ReCTx config file will be stored in~/.config/rectx/rectx.toml. On Windows, it will be stored in %appdata%/rectx/rectx.toml. And on MacOS, it will be stored in ~/Library/Preferences/rectx/rectx.toml.

    What to store?

    • User's name
    • A list of rectx projects
    • Which compilers are installed
    enhancement 
    opened by hrszpuk 2
  • New project enhancements

    New project enhancements

    Enhancements

    1. rectx new "name" should detect which compiler is installed (if any) and then generate a config file with the correct compiler set as default. This should save time for the user as they won't have to edit the config file, it should just work out of the box. If both compilers are installed, default to "rgoc", and if no compiler is installed, tell the user how to install them.
    2. Instead of rectx new "name", the new command will be rectx new after which the user is asked questions for information such as project name, author name, project type, etc..

    Specifics

    For number 2, most information should be gathered within the cli module which then passes the information to the manager module later. This keeps everything organized (i.e. input/output is handled by cli).

    enhancement good first issue manager module 
    opened by hrszpuk 7
  • ☢️ Roadmap for ReCTx ☢️

    ☢️ Roadmap for ReCTx ☢️

    Roadmap

    I'd like to have a plan for how I'm going to approach different features I think ReCTx is going to have. Each set of features has a version milestone.

    Version & features

    v1.0.0

    • [x] Custom CLI error reporting
      • [x] Check errors and report to user the issue instead of just printing the rust error message
      • [x] Add ISSUE and ABORT CLI tags (v3.0.0 features early)
    • [x] Config file
      • [x] Project information (author, version, binary/library, etc)
      • [x] Building information (compiler, directory, flags, etc)
      • [x] Profiles (release, debug, benchmark, etc)
    • [x] #8
    • [x] #14

    v2.0.0

    • [ ] Automatically select different compilers when creating a new project
      • [ ] Check whether rgoc or rctc is installed and chooses between them
      • [ ] Ask user for config value like author, project name, project type, versioning, etc
    • [ ] Initialise Git repository
    • [ ] Added .gitignore
    • [ ] Ask user for what LICENSE they would like
    • [ ] Fancy CLI changes
      • [x] Add colour to output
      • [x] Special tags for Info, Process, Issue, Abort, etc
      • [ ] Progress bars 😎

    v3.0.0

    • [ ] Project templates
      • [ ] Customise directories
      • [ ] Customise build profiles
      • [ ] New projects can be built with the template
    • [ ] Support for ReCT C libraries
      • [ ] Custom project template
      • [ ] Build profiles for C
      • [ ] Building libraries for ReCT
      • [ ] Packaging libraries for RPS

    v4.0.0

    • [ ] Check if packages used in ReCT files are locally installed
    documentation enhancement help wanted 
    opened by hrszpuk 1
Releases(1.1.0)
  • 1.1.0(Sep 24, 2022)

    What's Changed

    • Improvements to the help menu (+colours) by @hrszpuk in https://github.com/hrszpuk/rectx/pull/22
    • Major improvements to the help menu (colours, detail, commands, etc) by @hrszpuk in https://github.com/hrszpuk/rectx/pull/24

    Full Changelog: https://github.com/hrszpuk/rectx/compare/1.0.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Sep 23, 2022)

    ReCTx Project Manager v1.0.0

    What's Changed

    • check if project config file exists / it is a file by @mauro-balades in https://github.com/hrszpuk/rectx/pull/15
    • Target profiles, directory generation, and automatically moving dependencies when needed by @hrszpuk in https://github.com/hrszpuk/rectx/pull/16
    • Cross-platform support for Windows by @hrszpuk in https://github.com/hrszpuk/rectx/pull/17
    • v1.0.0 Complete by @hrszpuk in https://github.com/hrszpuk/rectx/pull/18

    New Contributors

    • @mauro-balades made their first contribution in https://github.com/hrszpuk/rectx/pull/15

    Full Changelog: https://github.com/hrszpuk/rectx/compare/0.3.0...1.0.0

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Sep 14, 2022)

    Configuration file

    A new project files has been added called cargo.toml. This file contains project information, and build/run profiles. You can modify the data in this document and ReCTx will update accordingly.

    What's Changed

    • Configuration file for custom executable generation 💯 by @hrszpuk in https://github.com/hrszpuk/rectx/pull/7
    • target/ and deps/ are now in [project] header (config.toml) by @hrszpuk in https://github.com/hrszpuk/rectx/pull/9
    • Added GitHub actions (.github/workflow/rust.yml) by @hrszpuk in https://github.com/hrszpuk/rectx/pull/10
    • Revert "Added GitHub actions (.github/workflow/rust.yml)" by @hrszpuk in https://github.com/hrszpuk/rectx/pull/11
    • Added GitHub actions (.github/workflow/rust.yml) (not reverted) by @hrszpuk in https://github.com/hrszpuk/rectx/pull/13
    • Sync up: v0.3.0 added project configuration file by @hrszpuk in https://github.com/hrszpuk/rectx/pull/12

    Full Changelog: https://github.com/hrszpuk/rectx/compare/0.2.1...0.3.0

    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Sep 13, 2022)

    What's Changed

    • Refactored multiple rectx mreactedodules in peparation for CLI merge by @hrszpuk in https://github.com/hrszpuk/rectx/pull/3
    • Custom "bubble up" error handlers for the CLI module by @hrszpuk in https://github.com/hrszpuk/rectx/pull/4
    • Major bug fixes, refactoring, and error handling by @hrszpuk in https://github.com/hrszpuk/rectx/pull/5

    New Contributors

    • @hrszpuk made their first contribution in https://github.com/hrszpuk/rectx/pull/3

    Full Changelog: https://github.com/hrszpuk/rectx/compare/0.1.0...0.2.1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Sep 6, 2022)

    Release v0.1.0

    This is the first public release of rectx (under the version 0.1.0 following MAJOR.MINOR.PATCH). rectx is a project manager for the ReCT programming language, which allows you to easily create new projects, build projects, and run projects.

    Full Changelog: https://github.com/hrszpuk/rectx/commits/0.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
Remy
I enjoy programming, and making tools/software everyone can use!
Remy
egui: an easy-to-use immediate mode GUI in pure Rust

?? egui: an easy-to-use GUI in pure Rust egui is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, native

Emil Ernerfeldt 12.6k Jan 3, 2023
A tiling window manager for Windows

komorebi Tiling Window Management for Windows. About komorebi is a tiling window manager that works as an extension to Microsoft's Desktop Window Mana

Jade (جاد) 2.6k Jan 1, 2023
A floating, tag-based window manager written in Rust

worm worm is a floating, tag-based window manager for X11. It is written in the Rust programming language, using the X11RB library. Install cargo buil

null 627 Jan 4, 2023
Generic tiling window manager library in Rust

Pop Tiler Generic tiling window manager library for Rust, using an architecture based on GhostCell. License Licensed under the GNU Lesser General Publ

Pop!_OS 65 Dec 29, 2022
A window manager coded in rust

Tailwin A window manager coded in rust Thanks Victoruler for making the logo under a cc-by licence.

Arthur Melton 3 Jul 27, 2022
A straightforward stateful input manager for the Bevy game engine.

About A simple but robust input-action manager for Bevy: intended to be useful both as a plugin and a helpful library. Inputs from various input sourc

null 212 Jan 6, 2023
A cross-platform Mod Manager for RimWorld intended to work with macOS, linux and Windows

TODOs are available here. Discussions, PRs and Issues are open for anyone who is willing to contribute. rrm Inspired by Spoons rmm. This is a cross-pl

Alejandro Osornio 7 Sep 5, 2022
Experimental package manager/system configurator for system hoppers

mascara An experimental package manager/config initializer tool for system hoppers. mascara.toml [mascara] feature = "Debian" logs = { stdout = "blue"

Ethan Gallucci 1 Apr 15, 2022
skyWM is an extensible tiling window manager written in Rust

skyWM is an extensible tiling window manager written in Rust. skyWM has a clear and distinct focus adhering to the KISS and Unix philosophy.

Chadano 74 Dec 28, 2022
A Modern, Open Source GTK4 ebook manager powered by Rust.

Bookx An MVP in progress: An ebook reader with .epub support Context menu for each book (delete, rename book, info) On click switch the carousal to th

Anurag Dhadse 12 Dec 28, 2022
♾️ Fast & Simple AppImage manager

⚠️ Heavily in development (Not working) Leap Fast & Simple AppImage manager What's working Installation (github only, info about app not stored yet) R

lynx 7 Dec 12, 2022
skyWM is an extensible tiling window manager written in Rust

skyWM is an extensible tiling window manager written in Rust. skyWM has a clear and distinct focus adhering to the KISS and Unix philosophy.

Orbital 76 Apr 22, 2023
بو النوافذ is a personal Window manager

عربي؟ كمل قراءة بالعربي (لهجة سعودية). Bunnuafeth | بو النوافذ Bunnuafeth is a personal Window manager written in Rust General philosophy This window

Salman Abuhaimed 4 Oct 4, 2023
Easy pretty print your Rust struct into single element or table

Easy pretty print your Rust struct into single element or table

Adrien Carreira 4 Oct 1, 2021
This project attempts to allow the creation of reusable egui-themes

egui stylist Note this project is considered to be experimental and -- while used in personal projects -- may have API breaking changes without warnin

Jacobsky 22 Dec 1, 2022
SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

SixtyFPS 5.5k Jan 1, 2023
AccessKit: UI accessibility infrastructure across platforms and programming languages

AccessKit: UI accessibility infrastructure across platforms and programming languages Motivation There are numerous UI toolkits, and new ones continue

null 490 Jan 3, 2023
A small tool to use along with i3/Sway to add CSS-powered decorations to your focused windows, for better usability.

glimmer What A tool for decorating i3 windows when they get focused, written in Rust. classic.mp4 Why When using i3-gaps I ran into the following prob

Daniel Acuña 26 Dec 17, 2022
Use C++ libraries from Rust

ritual ritual allows to use C++ libraries from Rust. It analyzes the C++ API of a library and generates a fully-featured crate that provides convenien

Rust-Qt 1.1k Jan 5, 2023