Website - WHY ? - Git repository of PLX website
PLX is a project developed to enhance the learning of programming languages, with a focus on a smooth and optimized learning experience. The goal of this project is to reduce the usual friction involved in completing coding exercises (such as manual compilation, running, testing, and result verification) by automating these steps.
PLX offers a terminal user interface (TUI) developed in Rust and supports multiple languages (currently C and C++). It enables automatic compilation as soon as a file is saved, automated checks to compare program outputs, and instant display of errors and output differences. The solution code can also be displayed. The project draws inspiration from Rustlings and aims to create a more efficient learning experience, particularly for programming courses at HEIG-VD.
Details
You need Git and the Rust toolchain 1.87 ([See installation via Rustup](https://rustup.rs/)). You also need a C or C++ compiler, depending on what programming language you want to use.git clone https://github.com/samuelroland/plx.git
cd plxcargo buildLook at src/lib.rs for now and generate the doc with cargo doc to understand more about the available data structures.
How to run tests
cargo testHow to run tests and include ignored tests (they are marked as #[ignored] because they need network access or are slow to run)
cargo test -- --include-ignoredDetails
This will install all necessary dependencies and build the program in release mode.
cd cli
cargo build --releaseTo run it
cd cli
cargo runInstall the CLI globally
cd cli
cargo install --path .Now you can try to run the plx command in your terminal. If ~/.cargo/bin is in your PATH, the command should be found.
Compilation dependencies
- Make sure you have the Tauri prequisites so all build dependencies will be present: Tauri prequisites
- The frontend is built using NodeJS v22+ and Pnpm 10+, make sure you have both of them
Details
Just run
cd desktop
pnpm install
pnpm tauri devDetails
WARNING: This is working mostly on Linux, installers for Windows are generated as .msi and for MacOS as .dmg but some features have not been tested or do not work.
- To build and generate a bundle for your platform
cd desktop pnpm install pnpm tauri build && pnpm tauri bundle
- On Fedora
sudo dnf install src-tauri/target/release/bundle/deb/plx_0.1.0_amd64.deb
- Or on Ubuntu
sudo apt install src-tauri/target/release/bundle/rpm/plx-0.1.0-1.x86_64.rpm
- On Windows: look at the generated
.msiundersrc-tauri/target/release/bundle/msi. - On MacOs: look at the generated
.dmgundersrc-tauri/target/release/bundle/dmg.
We provide demo builds to test early versions of PLX, here are the steps to setup these versions.
Prequisites
- Install Git and VSCode (or VSCodium, in this case when
codeis mentionned, replace withcodiumif you have VSCodium instead.) - If you want to do C: install
gcc(except if you are on MacOs where the existingclangis enough) - If you want to do C++: install
g++
Steps
-
Get a demo build under the releases and pick the correct bundle depending on your platform
-
Install the bundle
- On Windows or MacOS, double click on the installer
- On Linux
- On Fedora run
sudo dnf install plx-*.rpmto install the downloaded RPM - On Ubuntu run
sudo apt install ./plx-*.debto install the downloaded DEB
- On Fedora run
-
Open PLX desktop with the env variable EDITOR defined. This variable is necessary to indicate to PLX which IDE to open.
- On MacOS
- You may need to accept the untrusted app under Privacy and Security in your Settings
- You may need to right click > Open, on the plx.app package under
/Applicationsto mark the application as trusted - This is not ideal for now but you have to open it via absolute path like this to be able to define the
EDITORvariable tocodeEDITOR=code /Applications/plx.app/Contents/MacOS/plx-desktop
- On Windows, you can define the variable once globally and then open via the start menu. In Powershell in admin mode run this:
setx.exe /m EDITOR code.cmd
- On Linux, run the desktop app with this command
EDITOR=code plx-desktop
- On MacOS
-
Make sure
gccandgitandcodeare your inPATH, you can check that by just running the command in your terminal to see if there is no "command not found".- On Windows, you can try to add them with
setx /M path "C:\Program Files\Git\bin"in admin Powershell (adapt the path to the different folders in your situation).
- On Windows, you can try to add them with
-
Configure your IDE with auto-save
That's an important step to make sure the files you change are regularly saved and you haved the fastest feedback loop in PLX. This is crucial with live sessions to allow the teachers to updates to the code regularly. In VSCode, open your settings (Ctrl+shift+p > Open User Settings (JSON)) and enter this line"files.autoSave": "afterDelay",
We have a small demo course with a few exos in C and C++ to let you try it out.
-
Clone the demo course: To test PLX with a demo course, use this repository
https://github.com/samuelroland/plx-demo.git
paste this in the input on the home page and click on theAdd coursebutton.
-
Click on the DEMO course, it shoult connect to the live server on
live.plx.rs.
-
Open the DEMO course for training locally
-
You should see a course a bit like that
-
You can click on skill
Introductionand then double click on the first exo in C, your IDE should open on themain.cand you should see the details of the exo.
Tip: If VSCode doesn't open, you can open it yourself and retry to close and reopen the exo. In some cases, this might help PLX to open the first time. If it still doesn't work, make sure you have followed the previous section. -
You can try to introduce a build error and see the output directly in PLX
-
You can try to do the exo and make the checks in PLX to pass. If you do little mistakes, the diff system will show you where the output is incorrect.

-
You can leave the exo with the
Esckey or by clicking on the course name at the top. You can go the Home with the dedicated button at the top left.
At this point, if all these situations are working, PLX is fully working on your machine.
We are currently waiting for our school's approval before applying an open source license.


