快速开始
欢迎使用Rive!本指南将帮助您快速上手。
认识团队
Rive由一群充满激情的语言设计师和编译器工程师开发:
安装
前置要求
- Rust(最新稳定版本)
- Git
从源码构建
# 克隆仓库
git clone https://github.com/rive-lang/rive
cd rive
# 构建编译器
cargo build --release
# 添加到PATH(Linux/macOS)
export PATH=$PATH:$(pwd)/target/release
# 添加到PATH(Windows)
# 将target/release目录添加到PATH环境变量
您的第一个程序
创建一个新的Rive项目:
rive new hello-world
cd hello-world
这将创建一个简单的项目结构:
hello-world/
├── src/
│ └── main.rive
└── rive.toml
默认的src/main.rive包含:
fun main() {
print("Hello, Rive!")
}
运行您的程序:
rive run
您应该看到:Hello, Rive!
项目命令
rive run- 运行项目rive build- 构建项目rive check- 检查错误而不构建
下一步?
注意:Rive仍在积极开发中。功能和语法可能在版本之间发生变化。