{"id":40760816,"url":"https://github.com/foxzyt/Sapphire","last_synced_at":"2026-01-30T19:00:42.082Z","repository":{"id":300246636,"uuid":"1005654591","full_name":"foxzyt/Sapphire","owner":"foxzyt","description":"Sapphire is a hybrid programming language developed with a focus on high performance, simplicity, and a complete \"out-of-the-box\" experience. Unlike languages like C, where you often need to manage complex external dependencies for basic tasks, Sapphire comes with a comprehensive native ecosystem.","archived":false,"fork":false,"pushed_at":"2026-01-18T15:02:34.000Z","size":6127,"stargazers_count":25,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-18T22:05:51.164Z","etag":null,"topics":["c","cpp","programming","programming-language"],"latest_commit_sha":null,"homepage":"https://foxzyt.github.io/Sapphire/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxzyt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-20T15:23:48.000Z","updated_at":"2026-01-18T15:02:37.000Z","dependencies_parsed_at":"2025-07-27T16:17:30.246Z","dependency_job_id":"a8dc139d-d6f1-46a0-82d9-3811451cf5fc","html_url":"https://github.com/foxzyt/Sapphire","commit_stats":null,"previous_names":["foxzyt/mint","foxzyt/sapphire"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/foxzyt/Sapphire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzyt%2FSapphire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzyt%2FSapphire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzyt%2FSapphire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzyt%2FSapphire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxzyt","download_url":"https://codeload.github.com/foxzyt/Sapphire/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzyt%2FSapphire/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28917454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cpp","programming","programming-language"],"created_at":"2026-01-21T17:00:28.111Z","updated_at":"2026-01-30T19:00:42.061Z","avatar_url":"https://github.com/foxzyt.png","language":"C++","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/download.svg\" alt=\"Sapphire Logo\" width=\"180\"/\u003e\n\n# **Sapphire**\n\n### A fast, lightweight and expressive hybrid programming language\n\n[![Repo Size](https://img.shields.io/github/repo-size/foxzyt/Sapphire)](https://github.com/foxzyt/Sapphire)\n[![GitHub Issues](https://img.shields.io/github/issues/foxzyt/Sapphire)](https://github.com/foxzyt/Sapphire/issues)\n[![GitHub Stars](https://img.shields.io/github/stars/foxzyt/Sapphire?style=social)](https://github.com/foxzyt/Sapphire/stargazers)\n[![Last Commit](https://img.shields.io/github/last-commit/foxzyt/Sapphire)](https://github.com/foxzyt/Sapphire/commits/main)\n[![Sapphire Version](https://img.shields.io/badge/Sapphire-v1.0.6-blue)](https://github.com/foxzyt/Sapphire/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003c/div\u003e\n\n## Development Status\n\nSapphire is currently under **active development**.\n\nThe language is now focused on a **grid-based rendering system**, with a spreadsheet-like architecture already functional. Current work includes:\n\n* Solving **rendering and performance issues** related to grids\n* Making the **syntax more flexible**, including:\n\n  * Optional semicolons\n  * Automatic type inference\n  * Automatic number-to-string conversion\n* Language improvements and new features:\n\n  * `for` loops\n  * `enums`\n  * `const`\n  * Better error treatment\n  * General syntax and usability enhancements\n\n**Current Development Version:** `Sapphire v1.0.7`\n\n---\n\n## About the Project\n\n**Sapphire** is a **hybrid programming language** designed with a strong focus on:\n\n* Performance\n* Simplicity\n* Clarity\n\nIt aims to combine the speed of compiled languages with the ease of use of high-level scripting, making it suitable for tools, UI-driven applications, and system-level tasks.\n\n---\n\n## What You Can Do with Sapphire\n\n* Perform **complex mathematical and logical expressions**\n* Declare **variables, functions, classes, and arrays**\n* Build **native UI systems** easily\n* Communicate with the **operating system**\n* Handle **HTTP, JSON, file I/O**, and more\n* Write clean, readable, and efficient code with minimal boilerplate\n\n---\n\n## Technologies Used\n\n* **C++** — Core language used to build the compiler and runtime\n* **CMake** — Project build system\n* **SFML** — Window creation and rendering\n\n---\n\n## Features\n\n* **SapphireUI**\n  Native Immediate Mode GUI bundled directly with the executable\n\n* **Arithmetic Operations**\n  From basic math to advanced operations via built-in Math functions\n\n* **Garbage Collector**\n  Efficient **Mark-and-Sweep GC** implemented in C++\n\n* **JSON Parsing**\n  Native JSON parsing support\n\n* **HTTP Library**\n  Built-in HTTP features (ping, download, requests, etc.)\n\n* **System Utilities**\n  File I/O, colored terminal output, debug tools, and more\n\n* **Simple Declarations**\n  Easily declare functions, classes, and arrays (`ListUtil`)\n\n* **Low Learning Curve**\n  Create a UI window in minutes\n\n* **Built-in Layout Engine (WIP)**\n  Flexbox and grid-based layout system\n\n* **Static Typing**\n  Designed for maximum performance\n\n* **SVM (Sapphire Virtual Machine)**\n  Fast, custom-built virtual machine\n\n* **Mine: Plugin Repository**\n  Download plugins directly from the Sapphire CLI\n\n* **Bytecode Compilation**\n  Compile scripts into `.sbc` bytecode\n\n* **Lightweight \u0026 Standalone**\n  Fully statically linked executable (~30 MB, no DLLs required)\n\n---\n\n## Installation \u0026 Setup\n\n### Prerequisites\n\nSince the installer is still in development, installation is **manual**.\n\nYou may need:\n\n* **7-Zip or WinRAR** (optional, for extraction)\n\n### Installation Steps\n\n1. **Download** the latest release from the repository\n2. **Extract** the archive\n3. Open the **Sapphire root folder**\n4. Add the `build` directory to your system **PATH**\n5. Open a new terminal\n\nRun a script with:\n\n```bash\nSapphire your_script.sp\n```\n\nThis executes the script using Sapphire’s hybrid interpreter.\n\n---\n\n## Syntax \u0026 Examples\n\n### UI Example\n\n```sapphire\nstring btnLabel = \"Click here!\";\nUI.CreateStyle(\"BlueTheme\", \"#1a1a2e\", \"#e94560\", \"#0f3460\", 2.0, \"#16213e\", 10.0, \"Arial\", 18);\n\nfunction updateUI() void {\n    UI.Begin();\n    UI.PushStyle(\"BlueTheme\");\n\n    UI.SetBGColor(\"#16213e\");\n    UI.Text(\"Native UI!\");\n    UI.Spacing();\n\n    if (UI.Button(btnLabel, 200.0, 50.0)) {\n        print \"Button was clicked!\";\n    }\n\n    UI.PopStyle();\n    UI.End();\n}\n\nwhile (true) {\n    updateUI();\n}\n```\n\n---\n\n### HTTP, I/O \u0026 JSON Example\n\n*(Use Windows Terminal for ANSI color support)*\n\n```sapphire\nfunction main() void {\n    IO.printColor(\"cyan\", \"--- Starting Integration Test ---\");\n\n    IO.printColor(\"yellow\", \"Fetching API data...\");\n    string url = \"http://jsonplaceholder.typicode.com/todos/1\";\n    string response = HTTP.get(url);\n\n    if (len(response) \u003e 0) {\n        IO.printColor(\"green\", \"HTTP Response received successfully!\");\n\n        class data = JSON.parse(response);\n\n        IO.printColor(\"cyan\", \"Data ID:\");\n        print data.id;\n\n        IO.printColor(\"cyan\", \"Title:\");\n        print data.title;\n\n        string path = \"backup_api.json\";\n        IO.printColor(\"yellow\", \"Saving backup to disk...\");\n\n        if (IO.writeFile(path, response)) {\n            IO.printColor(\"green\", \"File saved: \" + path);\n        }\n\n        if (IO.exists(path)) {\n            IO.printColor(\"green\", \"Verification: File exists on disk.\");\n            string localContent = IO.readFile(path);\n            IO.printColor(\"cyan\", \"Content read from file:\");\n            print localContent;\n        }\n    } else {\n        IO.printColor(\"red\", \"Error: Could not connect to the API.\");\n    }\n\n    IO.printColor(\"green\", \"--- Test Finished ---\");\n}\n\nmain();\n```\n\n---\n\n## Contributing\n\nContributions are welcome!\n\nYou can help by:\n\n* Reporting bugs\n* Suggesting features\n* Submitting pull requests\n\n### Reporting Issues\n\nWhen opening an issue, please include:\n\n* Clear description of the problem or suggestion\n* Steps to reproduce (if applicable)\n* Expected vs actual behavior\n* Environment details (OS, compiler, etc.)\n\n---\n\n## Author\n\n**foxzyt**\n\n---\n\n## License\n\nThis project is licensed under the **MIT License**. Please steal my code.\nSee the `LICENSE` file for more information.\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxzyt%2FSapphire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxzyt%2FSapphire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxzyt%2FSapphire/lists"}