Skip to content

It uses the Elder FUTHARK to call functions. Very well structured and documented.

License

Notifications You must be signed in to change notification settings

Anon23261/Official-ghostC-OS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ฎ Rune Editor

License: MIT C++17 Build Status Security

๐Ÿš€ A modern, secure programming environment for the Rune language, integrated with GhostC OS.

โœจ Features

  • ๐ŸŽจ Rune Language Support: Full support for the Rune programming language with syntax highlighting and code completion
  • ๐Ÿ”’ GhostC OS Integration: Seamless integration with GhostC OS security features and system calls
  • ๐Ÿ’พ Memory Management: Secure memory allocation and deallocation with built-in safety checks
  • โšก Process Management: Advanced process control and monitoring capabilities
  • ๐Ÿ“ File System Operations: Secure file operations with encryption support
  • ๐Ÿ“Š System Monitoring: Real-time system metrics and performance monitoring
  • โš ๏ธ Error Handling: Comprehensive error handling and logging system

๐Ÿ› ๏ธ Building from Source

Prerequisites

Requirement Version
๐Ÿ’ป C++ Compiler C++17 compatible
๐Ÿ—๏ธ CMake >= 3.18
๐Ÿ‘ป GhostC OS Latest

๐Ÿš€ Build Instructions

# Clone the repository
git clone https://github.com/yourusername/rune-editor.git

# Navigate to the build directory
cd rune-lang
mkdir build && cd build

# Build the project
cmake ..
make

๐Ÿงช Running Tests

cd build
./rune_test

๐Ÿ“‚ Project Structure

๐Ÿ“ฆ rune-editor
 โ”ฃ ๐Ÿ“‚ docs            # ๐Ÿ“š Documentation
 โ”ฃ ๐Ÿ“‚ examples        # ๐Ÿ’ก Example programs
 โ”ฃ ๐Ÿ“‚ rune-lang       # ๐Ÿ”ง Core implementation
 โ”ƒ โ”ฃ ๐Ÿ“‚ include      # ๐Ÿ“‘ Header files
 โ”ƒ โ”ฃ ๐Ÿ“‚ src          # ๐Ÿ’ป Source files
 โ”ƒ โ”— ๐Ÿ“‚ tests        # ๐Ÿงช Test suite
 โ”— ๐Ÿ“‚ build          # ๐Ÿ—๏ธ Build artifacts

๐Ÿ’ก Examples

Check out our example programs in /examples:

File Description
๐Ÿ–ฅ๏ธ system_info.rune System metrics and info
โšก process_management.rune Process control
๐Ÿ’พ memory_management.rune Memory safety
๐Ÿ“ file_operations.rune File operations

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests.

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ” Security

The Rune Editor is built with security at its core:

  • ๐Ÿ›ก๏ธ Secure memory management
  • ๐Ÿ”’ Process isolation
  • ๐Ÿ”‘ Encrypted file operations
  • ๐Ÿ“ Comprehensive logging

GhostC Language Support

GhostC is now integrated into the kernel, providing a lightweight scripting language for system automation and customization. Key features include:

  • Basic type system (int, float, string, bool, array, struct)
  • Built-in functions for I/O operations
  • Stack-based execution model
  • Heap memory management
  • Symbol table for variable storage

Using GhostC

To use GhostC in your programs:

  1. Include the GhostC header:
#include <ghostc.h>
  1. Initialize the runtime:
GhostCRuntime* runtime = ghostc_init(1024, 4096);  // Stack size: 1024, Heap size: 4096
  1. Execute GhostC code:
const char* source = "print('Hello from GhostC!')";
GhostCCompiler compiler = {0};
ghostc_compile(source, &compiler);
ghostc_execute(runtime, compiler.bytecode, compiler.bytecode_size);
  1. Clean up:
ghostc_cleanup(runtime);

Hardware Compatibility

Raspberry Pi Zero W

The GhostC OS is optimized for the Raspberry Pi Zero W with the following specifications:

  • 1GHz single-core CPU
  • 512MB RAM
  • Built-in WiFi and Bluetooth
  • Mini HDMI port
  • Micro USB ports

Zero W Specific Setup

  1. Use a good quality power supply (5V 2.5A recommended)
  2. Connect via mini HDMI (requires mini HDMI to HDMI adapter)
  3. For keyboard, use a micro USB OTG adapter
  4. WiFi is enabled but Bluetooth is disabled by default to save resources

Performance Optimizations for Zero W

  • Display resolution set to 640x480 for better performance
  • GPU memory limited to 32MB
  • Bluetooth disabled by default
  • Audio disabled by default
  • USB power consumption optimized
  • Initial CPU turbo boost enabled for 30 seconds at boot

Other Raspberry Pi Models

For other Raspberry Pi models (3B+, 4, etc.), edit kernel/config.txt and uncomment the following lines:

#hdmi_mode=16  # 1080p 60Hz
#gpu_mem=128
#dtparam=audio=on
#max_usb_current=1

SD Card Preparation and Booting

Prerequisites

  • A micro SD card (minimum 4GB recommended)
  • SD card reader
  • For Zero W:
    • Mini HDMI to HDMI adapter
    • Micro USB OTG adapter for keyboard
    • 5V 2.5A power supply

Building the OS

  1. First, build the kernel:
cd kernel
./build-os.sh

Preparing the SD Card

  1. Insert your SD card into your computer
  2. Identify your SD card device (you can use lsblk command)
  3. Run the preparation script as root:
sudo ./prepare-sd.sh /dev/sdX  # Replace X with your SD card device letter

โš ๏ธ WARNING: Be very careful with the device name. Using the wrong device could erase your system drive!

Booting GhostC OS

  1. Insert the prepared SD card into your Raspberry Pi
  2. Connect a monitor via HDMI
  3. Connect a USB keyboard
  4. Power on the Raspberry Pi

The GhostC OS will boot automatically and you'll see the GhostTerminal interface.

Default Configuration

The default config.txt settings are optimized for:

  • HDMI output at 1080p
  • USB keyboard support
  • Basic GPIO functionality

You can modify these settings by editing the config.txt file before running the preparation script.

Troubleshooting

If you encounter boot issues:

  1. Ensure the SD card is properly formatted
  2. Verify all files were copied correctly
  3. Check your power supply is adequate (recommended: 5V 2.5A)
  4. Ensure your HDMI cable is connected before powering on

๐Ÿ’ฌ Support

Need help? Open an issue in our issue tracker!


Made with โค๏ธ by the GhostC OS team

Special thanks to:

  • Raspberry Pi Foundation for their incredible work on bare metal programming resources and documentation
  • The open source community for their continuous support and contributions

About

It uses the Elder FUTHARK to call functions. Very well structured and documented.

Resources

License

Stars

Watchers

Forks

Packages

No packages published