RaisFastRaisFast
Getting Started

安装

几秒钟安装 RaisFast — 支持 curl、npm、Homebrew、Docker、cargo 或从源码编译。

一键安装(推荐)

macOS / Linux

curl -fsSL https://raisfast.com/install.sh | sh

Windows (PowerShell)

irm https://raisfast.com/install.ps1 | iex

验证

raisfast --version

所有安装方式

全局安装:

npm install -g raisfast

免安装直接运行:

npx raisfast --help

npm 包封装的是原生二进制文件 — 运行时不需要 Node.js。

brew tap RaisFast/homebrew-tap
brew install raisfast

从 GitHub Container Registry 拉取:

docker pull ghcr.io/raisfast/raisfast:latest

运行:

docker run -d \
  --name raisfast \
  -p 9898:9898 \
  -v ./data:/app/data \
  ghcr.io/raisfast/raisfast:latest

或使用 Docker Compose 启动完整服务栈(后端 + 前端 + S3 存储):

curl -O https://raw.githubusercontent.com/RaisFast/raisfast/main/docker-compose.yml
docker compose up -d

可用标签:latest0.20.2.23(语义化版本)。

cargo install raisfast

需要 Rust 工具链。从 crates.io 安装。

GitHub Releases 下载预编译二进制文件:

平台Target
macOS (Apple Silicon)aarch64-apple-darwin
macOS (Intel)x86_64-apple-darwin
Linux (ARM64)aarch64-unknown-linux-gnu
Linux (ARM64, 静态)aarch64-unknown-linux-musl
Linux (x86_64)x86_64-unknown-linux-gnu
Linux (x86_64, 静态)x86_64-unknown-linux-musl
Windows (x86_64)x86_64-pc-windows-msvc

下载、解压、加入 PATH 即可。

从源码编译

如需自定义特性集或参与贡献。

前置要求

  • Rust 1.85+ (edition 2024)
  • C 编译器 — Linux 上需要 cc,macOS 上需要 Xcode 命令行工具
  • SQLite3 开发头文件
  • just — 命令运行器(推荐)

安装 just

# macOS
brew install just

# Linux
curl -LsSf https://github.com/casey/just/releases/latest/download/just-installer.sh | sh

# 或通过 cargo
cargo install just

# Windows
winget install --id Casey.Just

使用 just 快速编译

git clone https://github.com/RaisFast/raisfast.git
cd raisfast

# 编译发布版本(SQLite + 所有插件 + 搜索)
just build

# 编译包含 Admin UI 的完整版本(前端 + 后端)
just build-full

# 启动开发服务器
just dev

编译产物位于 target/release/raisfast

just 常用命令

命令描述
just build编译发布版本(SQLite + 所有插件 + 搜索)
just build-full编译包含内嵌 Admin UI 的发布版本
just dev启动开发服务器
just check编译检查(快速,不输出二进制)
just lint运行 clippy,警告视为错误
just test运行所有测试
just qa格式检查 + lint
just ci完整 CI 流水线:fmt → lint → test

切换数据库后端

通过覆盖 db 变量切换数据库:

just db=postgres check
just db=mysql check

手动编译

不使用 just 时,可直接使用 cargo:

# 默认特性(SQLite + 所有插件 + 搜索 + OpenAPI)
cargo build --release

# 自定义特性
SQLX_OFFLINE=false DATABASE_URL="sqlite:./storage/db/raisfast.db?mode=rwc" \
  cargo build --release --no-default-features \
  --features "db-sqlite,plugin-all,search-tantivy,openapi"

默认特性

不使用 --no-default-features 时,默认启用:

db-sqlite, search-tantivy, plugin-js, plugin-lua, plugin-rhai, openapi, proxy

特性标志

数据库(选择其一)

标志描述
db-sqliteSQLite 后端
db-postgresPostgreSQL 后端
db-mysqlMySQL 后端

插件引擎

标志描述
plugin-jsJavaScript (QuickJS)
plugin-luaLua 5.4 (mlua)
plugin-rhaiRhai 脚本
plugin-wasmWebAssembly (wasmtime)
plugin-all四种引擎全部启用

搜索与存储

标志描述
search-tantivy基于 Tantivy 的全文搜索
storage-s3S3 兼容对象存储

支付提供商

标志描述
payment-alipay支付宝
payment-wechat微信支付
payment-stripeStripe
payment-dodoDodo Payments
payment-creemCreem
payment-all所有支付提供商

其他

标志描述
tls通过 rustls 启用 HTTPS
openapiSwagger UI,位于 /api/docs
proxy多租户反向代理
tauriTauri 桌面模式

系统诊断

安装完成后,运行内置健康检查:

raisfast doctor

它会验证环境、配置、数据库连接和安全设置。

On this page