s3://rustfs-brand/web/Templates · 网站与组件

网站与组件Web & UI

官网、文档站与控制台的界面标准。引入 tokens/tailwind.css,shadcn/ui 项目即可切换为 RustFS 品牌。
组件 16页面模板 15技术栈 Tailwind v4 · shadcn/ui令牌 tokens/tailwind.css

Foundations for UI界面基础

4px 基数、12 栏网格、1240px 内容宽;直角、1px 分隔线,阴影只用于浮层。

接入

tokens/tailwind.css
globals.css · layout.tsx
/* app/globals.css */
@import "tailwindcss";
@import "./tailwind.css"; /* RustFS tokens: colours, type, radius 0, easing */

/* app/layout.tsx */
import { Archivo, Geist, Geist_Mono } from "next/font/google"

const archivo = Archivo({ subsets: ["latin"], axes: ["wdth"], variable: "--font-archivo" })
const geistSans = Geist({ subsets: ["latin"], variable: "--font-geist-sans" })
const geistMono = Geist_Mono({ subsets: ["latin"], variable: "--font-geist-mono" })

<html className={`${archivo.variable} ${geistSans.variable} ${geistMono.variable}`}>
  • 只引入一个文件。tokens/tailwind.css 定义全部令牌,并把 --radius 与 rounded-* 归零。
  • 语义优先。组件只用 bg-primary、border-border 等语义类;色阶类仅用于悬停与按下。
  • 深色模式。在 <html> 上切换 .dark,组件无需 dark: 变体。

网格与断点

max-w-[1240px] · px-[clamp(16px,4.2vw,64px)]
1
2
3
4
grid-cols-4 · sm:grid-cols-8 · lg:grid-cols-12
断点最小宽度栏数栏间距布局
base0416px单栏;按钮通栏;导航收为菜单
sm640px824px卡片两栏
md768px824px完整导航;标题与导语并排
lg1024px1224px文档侧栏;卡片三栏
xl1280px1224px内容达 1240px
2xl1536px1224px内容不变,仅边距增加

间距

基数 4px
14px
28px
312px
416px
624px
832px
1248px
1664px
2496px
32128px
  • 组件内 4–16px;组件间 24–32px;内容组间 48–64px;区块间 96–128px。
  • 不得使用 4px 网格外的数值(如 13px、18px);字号与行高除外。

圆角、边框、层级与焦点

radius 0 · 1px · shadow-overlay · 2px ring
圆角
rounded-md · rounded-xl → 0px
边框
border-border分隔、卡片、表格
border-strong控件、描边按钮
border-foreground悬停、选中、区块线
层级仅浮层:shadow-overlay
焦点
链接
outline 2px · offset 2px
  • 圆角一律为 0;不得使用 rounded-full,也不得以任意值加回圆角。
  • 卡片、按钮与输入框不加阴影,以 1px 边框与 surface 区分;浮层使用 shadow-overlay。
  • 焦点统一为 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring,仅在键盘焦点时出现,不得移除。

Components组件

每个组件须覆盖默认、悬停、键盘焦点、按下与禁用五种状态。

01按钮

sm 32 · default 40 · lg 48 · icon 40
变体
尺寸
sm · 32px
default · 40px
lg · 48px
icon · 40px
图标
状态
默认
悬停
键盘焦点
按下
禁用
  • 每屏只有一个主按钮。次要操作用 outline 或 secondary;危险操作用 destructive 并须二次确认。
  • 文字以动词开头,不超过 3 个词或 6 个汉字;仅图标按钮须加 aria-label。
  • 禁用为 40% 不透明度;不得以隐藏按钮表示不可用。
components/ui/button.tsx
// components/ui/button.tsx
const buttonVariants = cva(
  [
    "relative isolate inline-flex shrink-0 items-center justify-center gap-2 overflow-hidden border border-transparent font-medium whitespace-nowrap select-none",
    "transition-[translate,background-color,border-color,color,text-decoration-color] duration-(--duration-fast) ease-standard",
    "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
    "disabled:pointer-events-none disabled:opacity-40",
  ],
  {
    variants: {
      variant: {
        default: [
          "bg-primary text-primary-foreground hover:bg-blue-600 active:bg-blue-700 hover:-translate-y-px active:translate-y-0 motion-reduce:hover:translate-y-0",
          "before:absolute before:inset-y-0 before:left-0 before:-z-10 before:w-1/3 before:-translate-x-[150%] before:-skew-x-12 before:bg-white/20",
          "hover:before:translate-x-[320%] hover:before:transition-transform hover:before:duration-(--duration-scene) hover:before:ease-emphasized motion-reduce:before:hidden",
        ],
        secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--secondary),var(--foreground)_8%)] hover:-translate-y-px active:translate-y-0 motion-reduce:hover:translate-y-0",
        outline: "border-strong bg-background text-foreground hover:border-foreground hover:-translate-y-px active:translate-y-0 motion-reduce:hover:translate-y-0",
        ghost: "text-foreground hover:bg-surface active:bg-surface-2",
        link: "text-link underline decoration-transparent decoration-1 underline-offset-4 hover:decoration-current",
        destructive: "bg-destructive text-destructive-foreground hover:bg-[color-mix(in_oklab,var(--destructive),var(--foreground)_14%)] hover:-translate-y-px active:translate-y-0 motion-reduce:hover:translate-y-0",
      },
      size: {
        sm: "h-8 px-3 text-[13px] [&_svg]:size-3.5",
        default: "h-10 px-4 text-sm [&_svg]:size-4",
        lg: "h-12 px-5 text-[15px] [&_svg]:size-4.5",
        icon: "size-10 [&_svg]:size-4.5",
      },
    },
    compoundVariants: [{ variant: "link", class: "h-auto px-0" }],
    defaultVariants: { variant: "default", size: "default" },
  },
)

<Button>Deploy</Button>
<Button variant="outline" size="sm"><Icon name="download" />Download</Button>

02输入框

高 40 · 标签 · 帮助文字 · 错误

仅可使用 3–63 个小写字母、数字、点或连字符。

https://

S3 API 默认监听 9000 端口,控制台为 9001。

由集群配置决定,此处只读。

  • 标签始终可见,位于上方;占位符只示范格式,不得代替标签。
  • 错误时边框与文字为 danger 并加方块标记,说明如何修正;以 aria-invalid 与 aria-describedby 关联。
  • 机器值(路径、端点、版本)用 Geist Mono 13px;禁用字段保留数值并说明原因。
bucket-name-field.tsx
<div className="grid gap-2">
  <label htmlFor="bucket" className="text-sm font-medium text-foreground">Bucket name</label>
  <input id="bucket" aria-invalid={invalid} aria-describedby="bucket-help" className={cn(
    "h-10 w-full min-w-0 border border-input bg-background px-3 text-sm text-foreground placeholder:text-faint",
    "transition-colors duration-(--duration-fast) ease-standard hover:border-faint",
    "focus-visible:border-ring focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
    "aria-invalid:border-danger aria-invalid:focus-visible:outline-danger",
    "disabled:cursor-not-allowed disabled:border-border disabled:bg-surface disabled:text-faint",
  )} />
  {invalid ? (
    <p id="bucket-help" className="flex items-center gap-2 text-[13px] leading-normal text-danger">
      <i className="size-2 shrink-0 bg-danger" />Use 3–63 lowercase letters, numbers, dots or hyphens.
    </p>
  ) : (
    <p id="bucket-help" className="text-[13px] leading-normal text-muted-foreground">3–63 characters.</p>
  )}
</div>

<div className={cn(
  "flex h-10 items-stretch border border-input bg-background transition-colors duration-(--duration-fast) ease-standard hover:border-faint",
  "focus-within:border-ring focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring",
)}>
  <span className="grid place-items-center border-r border-border bg-surface px-3 font-mono text-xs text-muted-foreground">https://</span>
  <input className="min-w-0 flex-1 bg-transparent px-3 font-mono text-[13px] text-foreground placeholder:text-faint focus-visible:outline-none" />
</div>

03下拉选择与分段控件

select · radix ToggleGroup
时间范围

当前:最近 24 小时。

  • 2–5 个可见互斥选项用分段控件;更多用下拉选择,超过 7 个用可搜索组合框。
  • 分段选中项为前景色实底;不得填充蓝色,以免与主按钮混淆。
  • 下拉箭头为 1.5px 直角折线,与图标系统一致。
storage-class.tsx · time-range.tsx
<div className="relative">
  <select className={cn(
    "h-10 w-full appearance-none border border-input bg-background pr-10 pl-3 text-sm text-foreground",
    "transition-colors duration-(--duration-fast) ease-standard hover:border-faint",
    "focus-visible:border-ring focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
  )}>
    <option>STANDARD</option>
    <option>REDUCED_REDUNDANCY</option>
  </select>
  <ChevronDown className="pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground" />
</div>

// import { ToggleGroup } from "radix-ui"
<ToggleGroup.Root type="single" defaultValue="24h" className="inline-flex border border-strong">
  <ToggleGroup.Item value="1h" className={cn(
    "h-8 min-w-11 px-3 font-mono text-xs text-muted-foreground transition-colors duration-(--duration-fast) ease-standard not-first:border-l not-first:border-strong",
    "hover:text-foreground data-[state=on]:bg-foreground data-[state=on]:text-background",
    "focus-visible:relative focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
  )}>1H</ToggleGroup.Item>
  {/* 24H · 7D · 30D */}
</ToggleGroup.Root>

04复选框与开关

16 × 16 · 36 × 20
复选框
开关
  • 复选框用于需提交的设置;开关用于立即生效的设置。
  • 均为直角方形,勾选为 Signal Blue 填充,部分选择为短横线。
  • 整行标签可点击,高度不少于 24px,触屏不少于 44px。
checkbox.tsx · switch.tsx
<label className="inline-flex items-center gap-2.5 text-sm text-foreground has-disabled:text-faint">
  <span className="relative grid size-4 shrink-0 place-items-center">
    <input type="checkbox" className={cn(
      "peer absolute inset-0 appearance-none border border-input bg-background transition-colors duration-(--duration-instant) ease-standard",
      "hover:border-faint checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary",
      "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:border-border disabled:bg-surface",
    )} />
    <Icon name="check" strokeWidth={2.5} className="pointer-events-none relative col-start-1 row-start-1 size-3.5 text-primary-foreground opacity-0 peer-checked:opacity-100" />
    <i className="pointer-events-none relative col-start-1 row-start-1 h-0.5 w-2 bg-primary-foreground opacity-0 peer-indeterminate:opacity-100" />
  </span>
  Enable versioning
</label>

<button role="switch" aria-checked={on} onClick={() => setOn(!on)} className={cn(
  "group inline-flex h-5 w-9 shrink-0 items-center border border-input bg-surface-2 p-0.5 transition-colors duration-(--duration-fast) ease-standard",
  "aria-checked:border-primary aria-checked:bg-primary disabled:opacity-40",
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
)}>
  <span className="size-3.5 bg-subtle transition-[translate,background-color] duration-(--duration-fast) ease-emphasized group-aria-checked:translate-x-4 group-aria-checked:bg-primary-foreground motion-reduce:transition-none" />
</button>

05状态标记与徽标

方形标记 8px · 高 24
盘状态
在线修复中降级离线
功能状态
可用预览可选构建
分片
数据 12校验 4
徽标
1.0.1最新存储桶 12
  • 颜色只在方形标记上。8px 方块、等宽大写与 1px 边框;不得用圆点、胶囊或彩色底。
  • 在线 = success,修复中 = brand,降级 = warning,离线 = danger;文字标签始终保留。
  • Oxide 只用于校验块与预览功能,每个视图至多一处。
status-chip.tsx
const MARK = {
  online: "size-2 shrink-0 bg-success",
  healing: "size-2 shrink-0 bg-brand animate-[rfs-heal_2880ms_steps(1)_infinite]",
  degraded: "size-2 shrink-0 bg-warning",
  offline: "size-2 shrink-0 bg-danger",
  parity: "size-2 shrink-0 bg-parity",
}

<span className="inline-flex h-6 items-center gap-1.5 border border-border bg-background px-2 font-mono text-[11px] leading-none font-medium tracking-[0.06em] text-foreground uppercase">
  <i className={MARK.healing} />
  Healing
</span>

<span className="inline-flex h-6 items-center bg-foreground px-2 font-mono text-[11px] leading-none font-medium tracking-[0.06em] text-background uppercase">1.0.1</span>
<span className="inline-grid h-5 min-w-5 place-items-center bg-surface-2 px-1 font-mono text-[11px] leading-none text-foreground tabular-nums">12</span>

06标签页

radix Tabs · h-11
对象列表:键、大小、最后修改时间与存储类别。 · 示例数据
  • 当前标签为 2px Signal Blue 底线加前景色文字。
  • 2–7 个标签;窄屏横向滚动,不换行、不收入菜单。
  • 只允许图标与等宽数字计数,不加其他装饰。
bucket-tabs.tsx
// import { Tabs } from "radix-ui"
<Tabs.Root defaultValue="objects">
  <Tabs.List className="flex overflow-x-auto border-b border-border [scrollbar-width:none]">
    <Tabs.Trigger value="objects" className={cn(
      "relative inline-flex h-11 shrink-0 items-center gap-2 px-3.5 text-sm text-muted-foreground transition-colors duration-(--duration-fast) ease-standard hover:text-foreground",
      "after:absolute after:inset-x-0 after:-bottom-px after:h-0.5 after:bg-transparent data-[state=active]:text-foreground data-[state=active]:after:bg-brand",
      "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
    )}>
      Objects <span className="inline-grid h-5 min-w-5 place-items-center bg-surface-2 px-1 font-mono text-[11px] leading-none text-foreground tabular-nums">128</span>
    </Tabs.Trigger>
    {/* Versions · Lifecycle · Replication */}
  </Tabs.List>
  <Tabs.Content value="objects" className="pt-5 text-sm leading-relaxed text-subtle focus-visible:outline-none">…</Tabs.Content>
</Tabs.Root>

07代码块与命令栏

Geist Mono 13 / 1.65 · Ink
命令栏
curl -O https://rustfs.com/install_rustfs.sh && bash install_rustfs.sh
代码块
Docker · README
# Create data and logs directories
mkdir -p data logs

# Change the owner of these directories
chown -R 10001:10001 data logs

docker run -d -p 9000:9000 -p 9001:9001 -v $(pwd)/data:/data -v $(pwd)/logs:/logs rustfs/rustfs:latest
  • 代码始终在 Ink 底上,Geist Mono 13px / 1.65,两种主题相同。
  • 命令只取自 README 或官方文档;以注释说明结果,不得虚构输出。
  • 提示符 $ 不被复制;长命令横向滚动,不折行。
command-bar.tsx
const [copied, setCopied] = useState(false)

<div className="flex min-w-0 items-stretch border border-neutral-800 bg-neutral-950 text-neutral-100">
  <code className="flex min-w-0 flex-1 items-center gap-3 overflow-x-auto bg-transparent px-4 py-3 font-mono text-[13px] leading-5 whitespace-nowrap text-neutral-100 [scrollbar-width:thin]">
    <span className="text-blue-400 select-none">$</span>{command}
  </code>
  <button
    aria-label="Copy command"
    data-copied={copied}
    onClick={async () => {
      await navigator.clipboard.writeText(command)
      setCopied(true)
      toast.success("Copied")
      setTimeout(() => setCopied(false), 1600)
    }}
    className={cn(
      "grid w-11 shrink-0 place-items-center border-l border-neutral-800 text-neutral-400 transition-colors duration-(--duration-fast) ease-standard",
      "hover:bg-neutral-900 hover:text-white focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-400 data-[copied=true]:text-green-500",
    )}
  >
    <Icon name={copied ? "check" : "copy"} className="size-4" />
  </button>
</div>

08提示框

note · tip · warning · preview
说明

容器以 UID 10001 运行。挂载的数据与日志目录须先授权给该用户。

提示

S3 API 默认监听 9000 端口,控制台为 9001。

警告

EC 4+2 最多容忍 2 块盘同时故障;超过后对象不可读取,直到盘恢复。

预览

S3 Tables(Iceberg REST)为预览功能,接口可能在后续版本中变更。

  • 类型只由方形标记区分(info / success / warning / parity);不用色条或彩色底。
  • 每个只说一件事,至多 3 句;每屏至多 2 个。
  • 警告写明后果与条件,不用感叹号或全大写。
callout.tsx
<div role="note" className="grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border border-border bg-surface px-4 py-3.5 text-sm leading-relaxed">
  <i className="mt-1 size-2.5 bg-warning" aria-hidden="true" />
  <b className="font-mono text-[11px] leading-[18px] font-medium tracking-[0.08em] text-foreground uppercase">Warning</b>
  <p className="col-start-2 text-subtle">EC 4+2 tolerates at most two failed drives.</p>
</div>

// note: bg-info · tip: bg-success · warning: bg-warning · preview: bg-parity

09数据表格

行高 40 · 等宽数字右对齐
纠删集 1 · 6 块盘 EC 4+2示例数据
盘节点状态已用 TiB容量 TiB使用率
/data/rustfs0node-01在线3.427.2847%
/data/rustfs1node-01在线3.397.2847%
/data/rustfs2node-02修复中1.077.2815%
/data/rustfs3node-02降级6.917.2895%
/data/rustfs4node-03离线—7.28—
/data/rustfs5node-03在线3.407.2847%
  • 数字右对齐、等宽,单位写在表头或数值后;文本左对齐。
  • 行高 40px,表头 36px;只用 1px 分隔线,不用斑马纹。
  • 缺失值写「—」;窄屏时表格在容器内横向滚动,页面不滚动。
drives-table.tsx
<div className="overflow-x-auto border border-border">
  <table className="w-full min-w-[640px] border-collapse text-[13px] leading-none">
    <thead>
      <tr>
        <th className="h-9 border-b border-border bg-surface px-3 text-left font-mono text-[11px] font-medium tracking-[0.06em] whitespace-nowrap text-muted-foreground uppercase">Drive</th>
        <th className="h-9 border-b border-border bg-surface px-3 text-left font-mono text-[11px] font-medium tracking-[0.06em] whitespace-nowrap text-muted-foreground uppercase text-right">Used</th>
      </tr>
    </thead>
    <tbody>
      <tr className="border-b border-border transition-colors duration-(--duration-instant) last:border-0 hover:bg-surface">
        <td className="h-10 px-3 whitespace-nowrap text-foreground font-mono">/data/rustfs0</td>
        <td className="h-10 px-3 whitespace-nowrap text-foreground text-right font-mono tabular-nums">3.42 TiB</td>
      </tr>
    </tbody>
  </table>
</div>

10卡片

1px 边框 · 内边距 24
  • 整张卡片为一个链接;悬停时边框变为前景色,箭头右移 2px。
  • 不得用色条、阴影、渐变或圆角强调卡片。
  • 一个图标、一个标题、一至两句说明;同组等高。
feature-card.tsx
<a href="/docs/erasure-coding/" className={cn(
  "group flex flex-col gap-3 border border-border bg-card p-6 text-card-foreground",
  "transition-colors duration-(--duration-base) ease-standard hover:border-foreground",
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
)}>
  <span className="grid size-10 shrink-0 place-items-center border border-border text-brand [&_svg]:size-5"><Icon name="shard" /></span>
  <h3 className="mt-3 text-lg leading-snug font-semibold">Erasure coding</h3>
  <p className="text-sm leading-relaxed text-muted-foreground">…</p>
  <span className="mt-auto inline-flex items-center gap-1.5 pt-2 text-sm font-medium text-link">
    Learn more <Icon name="arrow-right" className="size-4 transition-transform duration-(--duration-base) ease-emphasized group-hover:translate-x-0.5 motion-reduce:transition-none" />
  </span>
</a>

12公告栏

高 40 · Ink 底
RustFS 1.0.1 现已发布
  • 位于导航栏之上,Ink 底,全站同时只有一条。
  • 一句陈述加一个链接;不得用于促销倒计时或口号。
  • 可关闭,按公告编号记住;新公告重新显示。
announcement.tsx
<div role="region" aria-label="Announcement" className="bg-stage text-stage-foreground">
  <div className="mx-auto flex min-h-10 max-w-[1240px] items-center gap-3 px-[clamp(16px,4.2vw,64px)] py-2 text-[13px] leading-snug">
    <Stripe className="hidden text-[6px] sm:inline-flex" />
    <a href="/blog/rustfs-1-0-1/" className="group inline-flex items-center gap-1.5 font-medium underline decoration-white/30 underline-offset-4 transition-colors hover:decoration-white">
      RustFS 1.0.1 is available <Icon name="arrow-right" className="size-3.5" />
    </a>
    <button aria-label="Dismiss" className="ml-auto grid size-8 shrink-0 place-items-center text-neutral-400 transition-colors hover:text-white">
      <Icon name="close" className="size-4" />
    </button>
  </div>
</div>

14通知

sonner · bottom-center
点击触发 · 示例数据
  • 通知只确认操作或报告后台结果;需要决定的用对话框。
  • 标题一行;说明给出对象与数值。
  • 成功 4 秒后消失,错误保留至关闭;同时至多 3 条。
sonner
import { toast } from "sonner"

toast.success("Bucket created", { description: "s3://photos" })
toast.warning("Quota at 85%", { description: "s3://backups · 8.5 of 10 TiB" })
toast.error("Access denied", { description: "s3:PutObject on s3://logs" })
toast.promise(upload(file), {
  loading: "Uploading…",
  success: "Upload complete",
  error: "Upload failed",
})

15空状态

轮廓分片矩阵 · 一个主操作

还没有存储桶

存储桶用于存放对象及其版本。创建第一个存储桶后,即可通过 S3 API 或控制台上传对象。

  • 说明此处将出现什么,并给出唯一的下一步。
  • 图形为轮廓模式的小分片矩阵;不用插画或表情。
  • 居中排列,是左对齐原则的唯一例外。
empty-buckets.tsx
<div className="grid justify-items-center gap-5 border border-dashed border-strong px-6 py-12 text-center">
  <ShardMatrix cols={8} rows={3} k={8} m={0} mode="outline" className="h-12 w-auto" />
  <h3 className="text-lg font-semibold">No buckets yet</h3>
  <p className="max-w-[40ch] text-sm leading-relaxed text-muted-foreground">A bucket holds objects and their versions.</p>
  <Button><Icon name="plus" />Create bucket</Button>
</div>

16进度与配额

修复进度7 / 16 块盘
修复中示例数据
存储桶配额 s3://backups6.8 / 10 TiB · 68%
正常
  • 可计数进度画成分片:完成为 brand,进行中为修复动效,未开始为轮廓。
  • 配额条 40 格:低于 80% 为 brand,80% 起 warning,95% 起 danger,并同步状态标记。
  • 数值写作「已用 / 总量 · 百分比」,等宽数字;设 role=progressbar 与 aria-valuenow。
heal-progress.tsx · quota.tsx
<div role="progressbar" aria-valuemin={0} aria-valuemax={16} aria-valuenow={7} className="grid grid-cols-[repeat(16,minmax(0,1fr))] gap-1">
  {drives.map((d) => <i key={d.id} className={SHARD[d.state]} />)}
</div>

const SHARD = {
  done: "aspect-square bg-brand",
  healing: "aspect-square animate-[rfs-heal_2880ms_steps(1)_infinite] bg-brand",
  todo: "aspect-square border border-strong",
}

// Quota: 40 cells; brand below 80%, warning from 80%, danger from 95%
<div className="grid h-3 grid-cols-[repeat(40,minmax(0,1fr))] gap-0.5">…</div>

Page sections页面区块

每个区块只有一个标签、一个标题与一个图形。

首屏 A · 标语与分片矩阵
1440 × 900 · rustfs.com 首页
RustFS 1.0.1 现已发布RustFS 1.0.1 is available更新说明 · github.com/rustfs/rustfs/releasesRelease notes · github.com/rustfs/rustfs/releases
产品Product文档Docs博客Blog社区Community
中 / ENGitHub 下载Download
开源对象存储Open-source object storage · Apache 2.0

AI 时代的基建,
从每一个字节算起。
AI infrastructure,
accounted for
byte by byte.

RustFS 是以 Rust 构建、兼容 S3 的分布式对象存储。
纠删码、位腐烂检测与自愈内建于每一次写入。
RustFS is distributed object storage built in Rust and compatible with S3. Erasure coding, bitrot detection and healing are built into every write.

开始使用Get started阅读文档Read the docs
$curl -O https://rustfs.com/install_rustfs.sh && bash install_rustfs.sh
安装命令须取自 README,可一键复制。
首屏 B · Signal 底色宣言
1440 × 900 · 发布页、活动页
产品Product文档Docs博客Blog社区Community
中 / ENGitHub 下载Download

兼容 S3。
Rust 构建。
开源。
S3-compatible.
Built in Rust.
Open source.

许可LicenseApache 2.0
最新版本Latest release1.0.1
正式版发布GA since2026-09-16
下载 1.0.1Download 1.0.1发布说明Release notes
Signal 底上主按钮为白底蓝字,条带签名的校验块为 Ink。
首屏 A · 手机
390 × 844
RustFS 1.0.1 现已发布RustFS 1.0.1 is available
开源对象存储Open-source object storage · Apache 2.0

AI 时代的基建,
从每一个字节算起。
AI infrastructure, accounted for byte by byte.

以 Rust 构建、兼容 S3 的分布式对象存储。Distributed object storage built in Rust and compatible with S3.

开始使用Get started阅读文档Read the docs
$curl -O https://rustfs.com/install_rustfs.sh && bash install_rustfs.sh
按钮通栏高 48px;安装命令单行横向滚动。
首屏 B · 手机
390 × 844

兼容 S3。
Rust 构建。
开源。
S3-compatible.
Built in Rust.
Open source.

许可LicenseApache 2.0
最新版本Latest release1.0.1
正式版发布GA since2026-09-16
下载 1.0.1Download 1.0.1
三句陈述保持三行;事实改为纵向列表。
404 · 手机
390 × 844
404 · NoSuchKey

此路径下没有对象。There is no object at this path.

页面可能已移动或删除。
请检查地址,或返回首页。
The page may have moved or been deleted. Check the address, or go back to the home page.

返回首页Back to home搜索文档Search the docs
标题与按钮置于拇指可及的下半屏。
功能网格
1440 × 900
数据保护Data protection

数据保护内建于每一次写入Data protection built into every write

每个对象写入时即切分为数据块与校验块,并分散到纠删集中的各块盘。下列能力均为默认构建的一部分。Every object is split into data and parity shards as it is written and spread across the drives of an erasure set. Each capability below ships in the default build.

EC k+m

纠删码Erasure coding

对象切分为数据块与校验块;不超过校验块数量的盘故障时,对象仍可读取。Objects are split into data and parity shards; they stay readable while failures stay within the parity count.

Checksums

位腐烂检测Bitrot detection

读取时校验每个分片,发现静默损坏后从校验块恢复。Every shard is verified on read; silent corruption is repaired from parity.

Heal

自愈Healing

盘或节点恢复后,缺失的分片在后台重建。When a drive or node returns, missing shards are rebuilt in the background.

WORM

版本控制与对象锁定Versioning and Object Lock

保留对象的历史版本;以 WORM 方式锁定,满足留存要求。Keep every version; lock objects as WORM to meet retention rules.

Bucket · Site

复制Replication

存储桶复制与站点复制,在集群之间保持数据同步。Bucket and site replication keep data in step across clusters.

ILM

生命周期与分层Lifecycle and tiering

按规则使对象过期,或转储到其他存储层。Expire objects or transition them to another tier by rule.

每项一个图标、一个标题、一句说明。
数据带
1440 × 800 · 数字须注明来源与日期
开源与社区Open source

在公开中构建Built in the open

RustFS 以 Apache 2.0 许可在 GitHub 上公开开发,任何人都可以阅读代码、提交问题与贡献补丁。RustFS is developed in the open on GitHub under Apache 2.0; anyone can read the code, file issues and contribute patches.

GitHub 星标GitHub stars34,869仓库 rustfs/rustfsRepository rustfs/rustfs
实例Instances2.7M+已部署的 RustFS 实例Deployed RustFS instances
Docker 拉取Docker pulls15.15M镜像 rustfs/rustfsImage rustfs/rustfs
提交Commits7,094主仓库提交数Commits to the main repository
数据来源:RustFS 官方网站。统计日期:2026-10-14。Source: official RustFS website. As of 2026-10-14.github.com/rustfs/rustfs
只用官方数字;不得使用「领先」「最快」等表述。
生态集成墙
1440 × 900 · 仅文字,不用第三方标志
生态Ecosystem

在现有技术栈中运行Runs in the stack you already have

凡支持 S3 API 的工具,均可将 RustFS 作为存储端点;部署与观测使用通用的开源工具。Any tool that speaks the S3 API can use RustFS as its storage endpoint; deployment and observability use common open-source tools.

部署DeployKubernetes
部署DeployDocker
指标MetricsPrometheus
看板DashboardsGrafana
反向代理ProxyNginx
计算ComputeSpark
分析AnalyticsClickHouse
机器学习MLTensorFlow
数据库备份DB backupPostgreSQL
流处理StreamingKafka
所列名称为其各自所有者的商标,仅用于说明兼容用途,不表示合作或认可关系。Names listed are trademarks of their respective owners, used only to describe compatibility; no partnership or endorsement is implied.
不得暗示合作关系;区块底部注明商标归属。
对比区块
1440 × 900
对比Comparison

选型前,核对这些事实Check these facts before you choose

项目CriterionRustFS对比对象Alternative
许可LicenseApache License 2.0待填:可核实的事实To fill: verifiable fact
实现语言LanguageRust待填:可核实的事实To fill: verifiable fact
接口API兼容 S3S3-compatible待填:可核实的事实To fill: verifiable fact
数据保护Data protection纠删码、位腐烂检测、自愈Erasure coding, bitrot detection, healing待填:可核实的事实To fill: verifiable fact
遥测Telemetry无None待填:可核实的事实To fill: verifiable fact
部署方式Deployment二进制、Docker、HelmBinary, Docker, Helm待填:可核实的事实To fill: verifiable fact
RustFS 一栏来源:github.com/rustfs/rustfs README。核对日期:2026-10-14。RustFS column source: github.com/rustfs/rustfs README. Checked 2026-10-14.
只比有来源的事实;对比栏须核对其官方文档后填写。
行动号召带
1440 × 800
快速开始Quick start

在本地
运行 RustFS
Run RustFS on your machine

一个容器即可启动单节点实例。数据目录须对 UID 10001 可写。One container starts a single-node instance. Data directories must be writable by UID 10001.

阅读快速开始Read the quick startgithub.com/rustfs/rustfs
~/rustfs
# 创建数据与日志目录# create data and log directories
$ mkdir -p data logs
$ chown -R 10001:10001 data logs

$ docker run -d -p 9000:9000 -p 9001:9001 \
    -v $(pwd)/data:/data \
    -v $(pwd)/logs:/logs \
    rustfs/rustfs:latest

# S3 API http://localhost:9000
# Console http://localhost:9001
命令取自 README;注释说明结果,不得虚构输出。
页脚
1440 × 900

AI 时代的基建,
从每一个字节算起。
AI infrastructure,
accounted for byte by byte.

订阅月报Monthly newsletter
name@example.com订阅Subscribe
产品Product功能Features下载Download控制台Console更新日志Changelog
文档Docs快速开始Quick start安装InstallationS3 兼容性S3 compatibilityHelm ChartHelm chart
社区CommunityGitHubGitHub讨论区Discussions博客Blog贡献指南Contributing
法律Legal许可证License安全Security商标Trademarks隐私Privacy
© 2026 RustFS · Apache License 2.0rustfs.comdocs.rustfs.comgithub.com/rustfs/rustfs
整幅字标与 1240px 内容栏同宽,不得裁切。
博客索引
1440 × 900
产品Product文档Docs博客Blog社区Community
中 / ENGitHub 下载Download

博客Blog

全部All发布Release产品Product教程Tutorial案例Case study集成Integration
1.0
发布Release2026-09-16

RustFS 1.0.0 正式发布:生产可用、开源、兼容 S3 的对象存储Announcing RustFS 1.0.0 GA: Production-Ready, Open Source, S3-Compatible Object Storage

产品Product2026-09-10

RustFS 推出 S3 Tables:开源对象存储中的 Apache Iceberg 表RustFS Launches S3 Tables: Apache Iceberg Tables Inside an Open-Source Object Store

教程Tutorial2026-08-19

分步教程:使用 RPM/DEB 软件包安装 RustFSStep-by-Step Tutorial: How to Install RustFS with RPM/DEB Packages

案例Case study2026-08-06

借助 Nawāt 与 RustFS 管理 AI 微调存储Managing AI Fine-Tuning Storage with Nawāt and RustFS

集成Integration2026-08-04

GitLab 与 RustFS 集成:OIDC 单点登录与 S3 对象存储GitLab and RustFS Integration: OIDC SSO and S3 Object Storage

迁移指南Migration

从 MinIO 迁移到 RustFS:技术指南Migrating from MinIO to RustFS: A Technical Guide

迁移指南Migration

二进制替换:从 MinIO 迁移到 RustFS 的简便方式Binary replacement: a simple way to migrate from MinIO to RustFS

封面用品牌图形,不用库存图片;不放摘要与头像。
404 页面
1440 × 900
产品Product文档Docs博客Blog社区Community
中 / ENGitHub 下载Download
404 · NoSuchKey

此路径下
没有对象。
There is no object at this path.

页面可能已移动或删除。
请检查地址,或返回首页。
The page may have moved or been deleted. Check the address, or go back to the home page.

返回首页Back to home搜索文档Search the docs
GET /docs/old-path · 404
文案平实,给出两个出口。
文档页布局
1440 × 900 · docs.rustfs.com
文档Docs搜索文档Search the docs⌘Kv1.0.1中 / ENGitHub
开始Get started概览Overview快速开始Quick start
安装InstallationLinuxLinuxDockerDockerKubernetesKubernetes
概念Concepts纠删码Erasure coding自愈Healing版本控制Versioning
管理Administration控制台Console身份与访问Identity and access生命周期Lifecycle
文档Docs / 安装Installation / Linux

在 Linux 上安装Install on Linux

使用官方安装脚本在单台 Linux 主机上安装 RustFS,然后在浏览器中打开控制台。Install RustFS on a single Linux host with the official script, then open the Console in a browser.

一键安装One-line install

$curl -O https://rustfs.com/install_rustfs.sh && bash install_rustfs.sh
说明Note S3 API 默认监听 9000 端口,控制台为 9001。生产环境须使用你自己设定的访问密钥。The S3 API listens on port 9000 by default and the Console on 9001. Production deployments must use access keys you set yourself.

访问控制台Open the Console

在浏览器中打开 http://localhost:9001,使用管理员凭据登录。Open http://localhost:9001 in a browser and sign in with the administrator credentials.

← 上一页Previous快速开始Quick start下一页Next →Docker
本页内容On this page一键安装One-line install访问控制台Open the Console下一步Next steps
侧栏 270px · 正文 ≤ 72 字符 · 目录 216px;当前页不用色条。

Email邮件

版式须在图片屏蔽、系统字体替换与深色反色时仍然成立。

Newsletter · 版本月报
640 × 1360 · 单栏,系统字体
RustFS 1.0.1 现已发布,另有三篇新文章。RustFS 1.0.1 is available, plus three new articles.在浏览器中查看View in browser
月报 · 2026.10Monthly · 2026.10
版本发布Release

RustFS 1.0.1 现已发布RustFS 1.0.1 is available

1.0.1 是 1.0 系列的首个补丁版本。升级前请阅读更新说明,并按部署方式执行对应的升级步骤。1.0.1 is the first patch release in the 1.0 series. Read the release notes before upgrading and follow the steps for your deployment method.

阅读更新说明Read the release notes或访问 or visit github.com/rustfs/rustfs/releases
使用指定版本运行Run a specific versiondocker run -d -p 9000:9000 -p 9001:9001 -v $(pwd)/data:/data -v $(pwd)/logs:/logs rustfs/rustfs:1.0.1
博客From the blog
2026-09-16RustFS 1.0.0 正式发布:生产可用、开源、兼容 S3 的对象存储Announcing RustFS 1.0.0 GA: Production-Ready, Open Source, S3-Compatible Object Storage
2026-09-10RustFS 推出 S3 Tables:开源对象存储中的 Apache Iceberg 表RustFS Launches S3 Tables: Apache Iceberg Tables Inside an Open-Source Object Store
2026-08-19分步教程:使用 RPM/DEB 软件包安装 RustFSStep-by-Step Tutorial: How to Install RustFS with RPM/DEB Packages
34,869GitHub 星标GitHub stars
15.15MDocker 镜像拉取Docker pulls
数据来源:RustFS 官方网站。统计日期:2026-10-14。Source: official RustFS website. As of 2026-10-14.
你收到这封邮件,是因为订阅了 RustFS 月报。You are receiving this email because you subscribed to the RustFS newsletter.退订Unsubscribe管理订阅Preferences在浏览器中查看View in browser公司名称与通讯地址Company name and postal address
WHITE 为默认;INK 用于检查深色模式。
项目规则
宽度640px 单栏,左右内边距 40px;窄屏缩至 100%
字体系统字体栈:-apple-system、Segoe UI、PingFang SC、Microsoft YaHei、Arial;不加载网络字体
图片关闭色带用单元格背景色,字标带 alt="RustFS";正文与按钮为实时文字
点击区域按钮高 48px;链接间距 ≥ 12px;可点区域 ≥ 44 × 44px
深色模式声明 color-scheme;字标置于 Signal 色带;不用透明底深色图片
正文16px / 1.6;链接带下划线;数字注明来源与日期
合规页脚含订阅原因、退订链接与通讯地址;附纯文本版本
email.html · bulletproof button
<!-- Bulletproof button: real text on a coloured cell, 48px tall -->
<table role="presentation" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td bgcolor="#0062FF" style="background:#0062FF;">
      <a href="https://github.com/rustfs/rustfs/releases"
         style="display:inline-block; padding:14px 24px; line-height:20px;
                font:600 16px/20px -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
                color:#FFFFFF; text-decoration:none;">
        Read the release notes
      </a>
    </td>
  </tr>
</table>

<!-- Dark-mode clients -->
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">

Micro-interactions微交互

微交互只用于反馈:时长取 80 / 150 / 240 / 420 / 720ms,缓动只用 standard 与 emphasized,不得回弹。

按钮扫光720ms · ease-emphasized · translate

上移 1px,光带自左向右扫过一次;离开立即复位。

链接下划线240ms · ease-emphasized · background-size

独立链接的下划线自左向右生长;段落内链接始终带下划线。

卡片悬停240ms · ease-standard / emphasized

边框变为前景色,箭头右移 2px;卡片不位移、不放大、不加阴影。

mkdir -p data logs
复制反馈1600ms · toast

图标变为 success 色对勾 1600ms,并弹出「已复制」。

在线
修复动效720ms × 3 · steps

分片掉线 → 校验块闪亮 → 重建,每步 720ms,阶跃切换不渐变。

正在加载
骨架屏1200ms · stagger 40ms · steps(1)

8px 分片排成文字行,每 40ms 点亮一格;不用闪烁渐变条。

交互属性时长缓动减少动态效果
按钮悬停上移translate150ms · --duration-fastease-standard不位移
按钮扫光translate720ms · --duration-sceneease-emphasized不显示
链接下划线background-size240ms · --duration-baseease-emphasized直接显示
卡片悬停border-color · translate240ms · --duration-baseease-standard · emphasized仅变色
控件状态background · border80–150msease-standard保持
修复动效background · outline720ms × 3steps(1)显示最终状态
骨架屏background1200ms · stagger 40mssteps(1)静态占位
heal · keyframes
/* 0–25% intact · 25–50% dropped out · 50–62.5% parity flash · rebuilt.
   --mx-* lets the same keyframes follow an artboard's surface. */
@keyframes rfs-heal {
  0% { background-color: var(--mx-data, var(--brand)); outline: 1px solid transparent; outline-offset: -1px; }
  25% { background-color: transparent; outline: 1px dashed var(--mx-data, var(--brand)); outline-offset: -1px; }
  50% { background-color: var(--mx-parity, var(--parity)); outline: 1px solid transparent; outline-offset: -1px; }
  62.5%, 100% { background-color: var(--mx-data, var(--brand)); outline: 1px solid transparent; outline-offset: -1px; }
}

<i className="size-2 bg-brand animate-[rfs-heal_2880ms_steps(1)_infinite]" />
skeleton · keyframes
@keyframes rfs-shard {
  0% { background-color: var(--surface-2); }
  50% { background-color: var(--strong); }
}

{cells.map((_, i) => (
  <i
    key={i}
    className="size-2 bg-surface-2 animate-[rfs-shard_1200ms_steps(1)_infinite]"
    style={{ animationDelay: `${(i % 24) * 40}ms` }}
  />
))}

Do & Don't正确与错误

上线前须逐项对照以下五组规则。

正确按钮、输入框与卡片均为直角。
s3://photos
创建取消
错误圆角与胶囊形状。
在线降级离线
正确方形标记、等宽文字、1px 边框。
OnlineDegradedOffline
错误彩色胶囊与圆点,对比度不足。
AI infrastructure, accounted for byte by byte.
正确平涂底色,图形来自产品结构。
AI infrastructure, accounted for byte by byte.
错误渐变底、发光与模糊光斑。
纠删集 16 块盘,EC 4+2,可容忍 2 块盘故障。更新于 2026-10-14 · 示例数据
正确文字用 foreground / subtle / muted-foreground,均 ≥ 4.5:1。
纠删集 16 块盘,EC 4+2,可容忍 2 块盘故障。更新于 2026-10-14
错误任意浅灰与过小字号。
正确1px 边框,悬停变为前景色。

对象锁定

以 WORM 方式保留对象。

错误侧边色条、阴影与圆角。