marcobambini/gravity

Gravity Programming Language

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 55 minutes ago
Added to GitGenius on September 15th, 2026
Created on February 24th, 2017
Open Issues & Pull Requests: 37 (+0)
GitHub issues: Enabled
Number of forks: 240
Total Stargazers: 4,568 (+0)
Total Subscribers: 108 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 29.1 hours
Mean response time: 161.4 days
90th percentile: 823.6 days
Tracked items: 16

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 175 days
Stale 30+ days: 3
Stale 90+ days: 3

Recent activity

Opened in 7 days: 1
Closed in 7 days: 1
Comments in 7 days: 1
Events in 7 days: 4

Top labels

No label distribution available yet.

Detailed Description

Gravity is a dynamically typed, embeddable programming language written in C that combines Swift-like syntax with support for procedural, object-oriented, functional, and data-driven programming paradigms.

Gravity addresses the need for a lightweight scripting language that can be embedded in host applications without external dependencies. It was developed specifically to enable portable code across iOS and Android platforms. The language implements a multipass compiler with optimization, a bytecode virtual machine with mark-and-sweep garbage collection, and a comprehensive embedding API that allows bridging between Gravity code and host applications. The entire implementation is compact, with the VM at approximately 6.5K lines, the compiler at roughly 10K lines, and combined overhead under 200KB on 64-bit systems.

Gravity suits projects requiring an embeddable scripting layer with modern language features. It is particularly valuable for applications targeting multiple platforms where code portability matters. The language supports closures, coroutines via fibers, nested classes, operator overloading, and optional modules for Math, File, JSON, and environment access. Developers should note that Gravity requires only a C99 compiler and has no external dependencies, making it straightforward to integrate into existing C or C++ codebases. The tool includes built-in unit testing support and JSON serialization capabilities.

The project maintains comprehensive documentation including an architecture guide and embedding examples. Development activity shows attention to robustness through dedicated fuzzing inputs and tests designed to catch infinite loops. The codebase is organized with clear separation between compiler, runtime, and shared components, supported by detailed API documentation in the header files.