Skip to content

Commit fb58373

Browse files
committed
Rust: ready to merge
1 parent ee7dbcd commit fb58373

5 files changed

Lines changed: 33 additions & 33 deletions

File tree

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ linker = "arm-linux-gnueabihf-gcc"
3232
linker = "x86_64-w64-mingw32-gcc"
3333

3434
# FreeBSD has no apt cross-gcc, so we cross with clang + a FreeBSD base sysroot
35-
# (extracted to /opt/freebsd-sysroot — see rust-edge-release.yml). clang is the
35+
# (extracted to /opt/freebsd-sysroot — see _build.yml). clang is the
3636
# link driver (with lld); the sysroot supplies FreeBSD's libc/crt + headers.
3737
[target.x86_64-unknown-freebsd]
3838
linker = "clang"

.github/workflows/ci.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ permissions:
2222
contents: read
2323

2424
jobs:
25-
# Single source of truth for branch/channel decisions. Post-merge flip lives
26-
# entirely in the TRANSITION CONFIG block below.
25+
# Single source of truth for branch/channel decisions.
2726
config:
2827
runs-on: ubuntu-latest
2928
outputs:
@@ -42,23 +41,17 @@ jobs:
4241
REF: ${{ github.ref }}
4342
run: |
4443
set -euo pipefail
45-
# ============ TRANSITION CONFIG (rust-backend → main) ============
46-
# These values namespace the in-progress rust line so it never
47-
# clobbers currently-published images/releases.
48-
# NOTE: the website image intentionally diverges from the app image's
49-
# versioned channel — its edge channel is the plain :edge tag (not
50-
# :v2), with :latest reserved for tagged releases.
51-
# POST-MERGE: set PUBLISH_BRANCH=main, GH_RELEASE_TAG=edge,
52-
# GH_RELEASE_NAME=Edge, DOCKER_EDGE_TAG=v2,
53-
# DOCKER_RUNTIME_API_TAG=v2-runtime-api, WEBSITE_TAG=edge,
54-
# then delete this comment.
55-
PUBLISH_BRANCH="rust-backend"
56-
GH_RELEASE_TAG="edge-rust"
57-
GH_RELEASE_NAME="Edge (rust)"
58-
DOCKER_EDGE_TAG="rust"
59-
DOCKER_RUNTIME_API_TAG="rust-runtime-api"
60-
WEBSITE_TAG="rust"
61-
# =================================================================
44+
# Channel configuration. Pushes to PUBLISH_BRANCH and manual dispatches
45+
# publish the edge channel; git tags publish stable releases.
46+
# The website image intentionally diverges from the app image's
47+
# versioned channel — its edge channel is the plain :edge tag (not
48+
# :v2), with :latest reserved for tagged releases.
49+
PUBLISH_BRANCH="main"
50+
GH_RELEASE_TAG="edge"
51+
GH_RELEASE_NAME="Edge"
52+
DOCKER_EDGE_TAG="v2"
53+
DOCKER_RUNTIME_API_TAG="v2-runtime-api"
54+
WEBSITE_TAG="edge"
6255
6356
is_tag=false
6457
is_edge=false
@@ -131,9 +124,6 @@ jobs:
131124
run: make build
132125

133126
- name: Install Playwright browsers
134-
# --with-deps installs the OS libraries the browsers need (esp. webkit,
135-
# which otherwise fails to launch on ubuntu-latest with "Host system is
136-
# missing dependencies to run browsers").
137127
run: npx playwright install --with-deps
138128

139129
- name: Run e2e tests
@@ -186,7 +176,7 @@ jobs:
186176
pattern: release-zips-*
187177
merge-multiple: true
188178

189-
# Branch / manual dispatch → refresh the namespaced edge prerelease.
179+
# Branch / manual dispatch → refresh the rolling edge prerelease.
190180
- name: Publish edge prerelease
191181
if: needs.config.outputs.is_edge == 'true'
192182
uses: softprops/action-gh-release@v2

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ node_modules
1010
# Anchored to the repo root so it ignores the built `./silverbullet` binary
1111
# WITHOUT also swallowing the `bin/silverbullet/` Rust crate directory.
1212
/silverbullet
13-
# Cross-compiled musl binaries produced by the rust-edge Docker workflow.
13+
# Cross-compiled musl binaries produced by the CI Docker build (_build.yml).
1414
/silverbullet-amd64
1515
/silverbullet-arm64
1616
/sb

bin/sb/src/commands/upgrade.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use std::os::unix::fs::PermissionsExt;
1919
pub fn run(edge: bool) -> Result<(), String> {
2020
if edge {
2121
println!("Upgrading sb to edge...");
22-
// The `edge` prerelease holds the latest Rust edge binaries (published by
23-
// .github/workflows/rust-edge-release.yml on every push to `main`).
22+
// The `edge` prerelease holds the latest edge binaries (published by
23+
// .github/workflows/ci.yml on every push to `main`).
2424
upgrade_cli("https://github.com/silverbulletmd/silverbullet/releases/download/edge")
2525
} else {
2626
println!("Upgrading sb...");

website/Development.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,27 @@ make fmt
8989
make test
9090
```
9191

92-
### Docker (early access)
93-
Multi-arch (amd64 + arm64) Docker images of the Rust server are published to the GitHub Container Registry on every push to the `rust-backend` branch (early access / unstable):
92+
### Docker
93+
Multi-arch (amd64 + arm64 + arm/v7) Docker images are published to Docker Hub
94+
and the GitHub Container Registry. The **edge** channel is rebuilt on every push
95+
to `main`; **stable** images come from git tags:
9496

95-
* `ghcr.io/silverbulletmd/silverbullet:rust-edge` — the server (Alpine, static musl binary)
96-
* `ghcr.io/silverbulletmd/silverbullet:rust-edge-runtime-api` — the same, plus Chromium for the server-side Lua runtime (`/.runtime/*`)
97+
* `zefhemel/silverbullet:v2` (edge) / `:latest` + `:X.Y.Z` (stable) — the server
98+
(Alpine, static musl binary)
99+
* `…:v2-runtime-api` (edge) / `:latest-runtime-api` + `:X.Y.Z-runtime-api`
100+
(stable) — the same, plus Chromium for the server-side Lua runtime
101+
(`/.runtime/*`)
102+
103+
Both images are mirrored to `ghcr.io/silverbulletmd/silverbullet` under the same
104+
tags.
97105

98106
To run one:
99107

100108
```shell
101-
docker run -p 3000:3000 -v <PATH-TO-YOUR-SPACE>:/space ghcr.io/silverbulletmd/silverbullet:rust-edge
109+
docker run -p 3000:3000 -v <PATH-TO-YOUR-SPACE>:/space zefhemel/silverbullet:v2
102110
```
103111

104-
These are built by `.github/workflows/rust-edge.yml`, which cross-compiles the binary natively (`cargo build --target` with installed musl cross-toolchains) and copies it into a small Alpine image.
112+
These are built by `.github/workflows/ci.yml`, which cross-compiles the binary
113+
natively (`cargo build --target` with installed musl cross-toolchains) and copies
114+
it into a small Alpine image.
105115

0 commit comments

Comments
 (0)