Adding Rustlings like binary, Makefile and semi Cross-Platform Support(WIP) - #5
Open
Alfred-Jijo wants to merge 16 commits into
Open
Adding Rustlings like binary, Makefile and semi Cross-Platform Support(WIP)#5Alfred-Jijo wants to merge 16 commits into
Alfred-Jijo wants to merge 16 commits into
Conversation
will come back that
its easy tu make a makefile crossplatform, because of wsl
Current State Added Cross-Platform Verification Tool (src/ceilings.c): Replaced initial Python scripts with a robust C implementation. Detects OS (Windows vs. POSIX) to handle directory traversal (<dirent.h> vs FindFirstFile) and shell redirection (/dev/null vs NUL) correctly. Implements a logic check using git apply --check --reverse. Integrated Build System: Added Makefile to handle compilation of individual exercises. Updated verification tool to trigger make for specific exercises before verifying logic. Ensures students see raw GCC/Clang compiler errors immediately if their code fails to build. Automation Scripts: Added generate_patches.cmd (Windows) and generate_patches.sh (Linux/macOS) to automatically generate solution patches from the exercises/ directory. Changed Buffer Safety: Increased internal buffer sizes (MAX_BUFFER = 4096) in ceilings.c to prevent GCC -Wformat-truncation warnings when constructing long file paths or commands. Code Style: Refactored ceilings.c to follow KNF/BSD coding standards (function prototypes, indentation, variable declarations). User Experience: Verification now stops immediately upon a compilation error to keep the feedback loop tight. Added specific error messages differentiating between "Compilation Failed" and "Logic Incorrect". Fixed Fixed shell command syntax for Windows cmd.exe where > /dev/null was causing syntax errors (replaced with dynamic NULL_DEVICE constant). Fixed path separators to be dynamic (\ for Windows, / for POSIX).k
Alfred-Jijo
marked this pull request as draft
December 29, 2025 16:53
Alfred-Jijo
marked this pull request as draft
December 29, 2025 16:53
Alfred-Jijo
marked this pull request as ready for review
December 29, 2025 16:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the initial Cmake verification app with a robust, C application (
src/ceilings.c) that needs to bootstrapped. It introduces aMakefilebuild system to ensure user changes code compiles before logic checks and adds full support for WSL, Linux, and macOS environments.Changes
Features
generate_patches.cmd(Windows) andgenerate_patches.sh(Bash) to automate the creation of solution patches from theexercises/directory.Bug Fixes & Refactoring
Testing
maketo build theceilingstool../ceilings(orceilings.exeon Windows).exercises/and compares them againstpatches/.exercises/001_START_HERE.c) and run verify. It should report a Compilation Error and stop.Checklist
gcc).MinGW/gcc).Makefilecorrectly targets individual exercises.