diff --git a/.DS_Store b/.DS_Store index d0e8c8b..2f60f4f 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.github/workflows/ ContinuousIntegration.yml b/.github/workflows/ ContinuousIntegration.yml new file mode 100644 index 0000000..0c8eeba --- /dev/null +++ b/.github/workflows/ ContinuousIntegration.yml @@ -0,0 +1,24 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install build essentials + run: sudo apt-get update && sudo apt-get install -y build-essential + - name: Build project + run: make -C code + - name: Run checks + run: make -C code check + - name: Run distcheck + run: make -C code distcheck + + diff --git a/.vs/.DS_Store b/.vs/.DS_Store index 5efaf50..f052fc0 100644 Binary files a/.vs/.DS_Store and b/.vs/.DS_Store differ diff --git a/.vs/RuanScript/.DS_Store b/.vs/RuanScript/.DS_Store index a918d43..0b87ac0 100644 Binary files a/.vs/RuanScript/.DS_Store and b/.vs/RuanScript/.DS_Store differ diff --git a/.vs/RuanScript/FileContentIndex/75da9cd9-dadf-40cf-a9cf-0c894e8a40b9.vsidx b/.vs/RuanScript/FileContentIndex/75da9cd9-dadf-40cf-a9cf-0c894e8a40b9.vsidx deleted file mode 100644 index ea55344..0000000 Binary files a/.vs/RuanScript/FileContentIndex/75da9cd9-dadf-40cf-a9cf-0c894e8a40b9.vsidx and /dev/null differ diff --git a/.vs/RuanScript/FileContentIndex/9ba7fbe1-9ac6-4534-adb7-34545ca286c7.vsidx b/.vs/RuanScript/FileContentIndex/9ba7fbe1-9ac6-4534-adb7-34545ca286c7.vsidx new file mode 100644 index 0000000..1f0f5fd Binary files /dev/null and b/.vs/RuanScript/FileContentIndex/9ba7fbe1-9ac6-4534-adb7-34545ca286c7.vsidx differ diff --git a/.vs/RuanScript/FileContentIndex/a0655172-cb21-40cc-887a-86f169ce0d54.vsidx b/.vs/RuanScript/FileContentIndex/a0655172-cb21-40cc-887a-86f169ce0d54.vsidx deleted file mode 100644 index 115870b..0000000 Binary files a/.vs/RuanScript/FileContentIndex/a0655172-cb21-40cc-887a-86f169ce0d54.vsidx and /dev/null differ diff --git a/.vs/RuanScript/FileContentIndex/a17c4b97-3dfb-4274-b7b3-6717f4d989ae.vsidx b/.vs/RuanScript/FileContentIndex/a17c4b97-3dfb-4274-b7b3-6717f4d989ae.vsidx new file mode 100644 index 0000000..987ef91 Binary files /dev/null and b/.vs/RuanScript/FileContentIndex/a17c4b97-3dfb-4274-b7b3-6717f4d989ae.vsidx differ diff --git a/.vs/RuanScript/v17/Browse.VC.db b/.vs/RuanScript/v17/Browse.VC.db index 5378692..6bd92d1 100644 Binary files a/.vs/RuanScript/v17/Browse.VC.db and b/.vs/RuanScript/v17/Browse.VC.db differ diff --git a/.vs/RuanScript/v17/Browse.VC.db-wal b/.vs/RuanScript/v17/Browse.VC.db-wal index a0fe384..e69de29 100644 Binary files a/.vs/RuanScript/v17/Browse.VC.db-wal and b/.vs/RuanScript/v17/Browse.VC.db-wal differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 82315b7..60b5c6b 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 51469b3..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,32 +0,0 @@ -// { -// // Use IntelliSense to learn about possible attributes. -// // Hover to view descriptions of existing attributes. -// // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 -// "version": "0.2.0", -// "configurations": [] -// } -{ - "configurations": [ - { - "type": "default", - "project": "CMakeLists.txt", - "projectTarget": "Compiler.exe", - "name": "Compiler.exe", - "args": [ - "r", - "C:/Mac/Home/Downloads/RuanScript/input/test.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT0_Empty.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT1_Hello.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT2_Volume.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT3_Factorial.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT4_Datatypes.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT5_General.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT6_Big.rs", - "C:/Mac/Home/Downloads/RuanScript/input/README.txt" - ] - - } - ], - "defaults": {}, - "version": "0.2.1" - } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index d551a2a..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "cmake.sourceDirectory": "/Users/thelion/Downloads/RuanScript/code" -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 4ede37a..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "tasks": [ - { - "type": "cppbuild", - "label": "C/C++: clang build active file", - "command": "/usr/bin/clang", - "args": [ - "-fcolor-diagnostics", - "-fansi-escape-codes", - "-g", - "${file}", - "-o", - "${fileDirname}/${fileBasenameNoExtension}" - ], - "options": { - "cwd": "${fileDirname}" - }, - "problemMatcher": [ - "$gcc" - ], - "group": { - "kind": "build", - "isDefault": true - }, - "detail": "Task generated by Debugger." - } - ], - "version": "2.0.0" -} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0ec0da2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Ruan Simo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7308df0..ca2de38 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,55 @@ -RuanScript --- - -RuanScript is a programming language designed for high school, calculus, and basic college/university level math, built after JavaScript. +# RuanScript + +**RuanScript** is an innovative programming language inspired by JavaScript, specifically crafted for high school, calculus, and introductory college/university level mathematics. + +## Key Features + +- **User-Friendly Syntax**: Simplified syntax based on JavaScript, making it accessible for beginners. +- **Educational Focus**: Ideal for learning and teaching fundamental math concepts. +- **Versatile Application**: Suitable for a variety of mathematical computations and problem-solving scenarios. + +## Continuous Integration + +This project utilizes GitHub Actions for seamless continuous integration, ensuring code quality and reliability through automated builds and tests. + +## Getting Started + +1. **Clone the Repository**: + ```sh + git clone https://github.com/Ruun/RuanScript.git + cd ruanscript + ``` + +2. **Build the Project**: + ```sh + make + ``` + +3. **Run Tests**: + ```sh + make check + ``` + +## Contributing + +We welcome contributions from the community. Please follow these steps to contribute: + +1. Fork the repository. +2. Create a new branch: `git checkout -b feature-branch-name` +3. Commit your changes: `git commit -m 'Add some feature'` +4. Push to the branch: `git push origin feature-branch-name` +5. Open a pull request. + +## Security Policy + +For information on reporting security vulnerabilities, please see our [Security Policy](./SECURITY.md). + + +## License + +RuanScript is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.. + +## Connect with Us + +For more information or to get involved, visit our [GitHub repository](https://github.com/Ruun). + diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..dc8c404 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,39 @@ +# Security Policy + +## Supported Versions + +We release patches for security vulnerabilities in the following versions: + +| Version | Supported | +| ------- | ------------------ | +| 1.x | :white_check_mark: | +| 0.x | :x: | + +## Reporting a Vulnerability + +If you discover a security vulnerability, please follow the steps below: + +1. **Do Not Open an Issue**: Security issues should not be discussed in public GitHub issues. Instead, send a private email to the project maintainers. + +2. **Contact Information**: + - Email: [Ruan@isruan.com](mailto:ruan@isruan.com) + +3. **Details to Include**: + - Description of the vulnerability. + - Steps to reproduce the vulnerability. + - Possible impacts of the vulnerability. + - Any potential fixes or mitigations you may have. + +4. **Expected Timeline**: + - We will acknowledge receipt of your report within 48 hours. + - We will provide a detailed response within 7 days, including our assessment of the issue, a mitigation plan, and an estimated timeline for a fix. + +## Security Updates + +We will communicate all security updates and vulnerabilities through: + +- GitHub Releases +- [Security Advisories](https://github.com/Ruun/ruanscript/security/advisories) + +Thank you for helping us keep RuanScript secure for everyone. + diff --git a/code/Makefile b/code/Makefile index 5ff94ea..ee47a15 100644 --- a/code/Makefile +++ b/code/Makefile @@ -1,4 +1,3 @@ - # Compiler CC = gcc @@ -25,9 +24,24 @@ $(EXEC): $(OBJS) %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ +# Check target to ensure the project builds correctly +check: all + @echo "Checking if the project compiles without errors..." + +# Dist target to simulate creating a distribution package (for example purposes) +dist: + @echo "Creating distribution package..." + # Add commands to create a distribution package here + +# Distcheck target to run dist and check targets +distcheck: dist check + @echo "Running distcheck..." + # Add additional distribution checks here + # Clean up the build clean: rm -f $(OBJS) $(EXEC) # Phony targets -.PHONY: all clean +.PHONY: all clean check dist distcheck +