# 使用 Homebrew, MacPorts 安装 gravity

查看 gravity 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:gravity
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gravity
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gravity
```

  证据: MacPorts ports tree: lang/gravity/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:gravity
- **软件包管理器:** Homebrew
- **版本:** 0.9.7
- **来源摘要:** Embeddable programming language
- **主页:** <https://www.gravity-lang.org/>
- **仓库:** <https://github.com/marcobambini/gravity>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gravity (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.9.7
## 项目历史与用法

Gravity is an embeddable, dynamically typed programming language implemented in C. It is packaged as a command-line interpreter/runtime but is historically most important as a small VM designed to be embedded in applications.

### 项目历史

The official README says Gravity was developed from scratch for the Creo project to provide portable code across iOS and Android. It combines a class-based, concurrent scripting model with Swift-like syntax and a small native runtime.

The project site presents Gravity as a small high-performance language with no external dependencies and a VM intended to add little overhead to an application. The GitHub release series records continuing maintenance of the interpreter and runtime.

### 采用历史

Gravity's adoption is specialized rather than ecosystem-wide. The official README names Creo as a core embedding target and the Untold game engine as another use case.

In package-manager terms, Gravity appeals to developers who want a lightweight scripting language or a studyable bytecode VM without pulling in a large external runtime.

### 使用方式

Users can run the Gravity executable for scripts or embed the language in a C/C++ application. Its documented language model supports procedural, object-oriented, functional, data-driven, and prototype-style programming patterns.

The lack of external dependencies is part of the intended deployment story: package managers can build a small C runtime, while embedders can include the VM in an application.

### 为什么软件包爱好者会关心

Gravity is interesting to package nerds because it is a compact language runtime rather than a mainstream language ecosystem. It packages cleanly as a native executable while also serving as embeddable infrastructure.

It is also a useful comparison point with Lua, Wren, Squirrel, and other application scripting languages: the package is less about global ecosystem adoption and more about how easily a host application can carry a scripting VM.

### 时间线

- 2013: Marco Bambini's site associates Gravity with work beginning in 2013.
- 2018: Public attention around the Gravity site and repository highlighted the embeddable VM design.
- 2020: The maintainer opened GitHub Discussions for project questions and community discussion.
- 2026: The GitHub release page records 0.9.x maintenance releases with runtime and compiler fixes.

### Related projects

- Creo: the official README describes Gravity as the core language built into Creo.
- Untold game engine: the official README names Gravity as its scripting language.
- Lua, Wren, and Squirrel are comparable embeddable scripting-language package niches, though they are separate projects.

### 来源

- <https://creolabs.com/gravity>
- <https://github.com/marcobambini/gravity>
- <https://github.com/marcobambini/gravity/releases>
- <https://www.gravity-lang.org/>


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 其他软件包管理器记录

- MacPorts - gravity: normalized package name match | MacPorts ports tree: lang/gravity/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/gravity.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gravity.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
