Show HN:HyScribe——一个用 Rust 编写的 WordPress 无缝替代品
Show HN: HyScribe – A drop-in replacement for WordPress, written in Rust

原始链接: https://github.com/hyscaler/HyScribe

HyScribe 是一个早期的开源 Rust 直接替代品,可替代 WordPress 7.0/7.1;它通过单个静态二进制文件,从现有站点的 MariaDB/MySQL 数据库和 wp-content 提供站点服务,无需数据库结构迁移,也无需 PHP 运行时。它旨在保留 URL、内容、用户和数据库兼容性,使管理员可以随时切换回 PHP 版 WordPress;PHP 仍然是页面、REST 响应和写入操作的测试基准。安全性是核心目标:会对不可信输入的解析器进行模糊测试,扩展则是带有声明权限和限制的沙箱化 WebAssembly 包。 v0.1.0 支持默认安装页面、内置区块主题、核心区块/格式化、hs-admin 界面、区块/站点编辑、媒体上传、核心 REST 读取和许多写入操作、登录/用户、评论、SMTP 邮件以及计划任务。它尚不适合生产环境:尚未经过外部安全审计,部分 admin/REST 路由返回 501,经典主题和插件移植尚未完成,PHP 插件不会运行,并且不支持多站点、XML-RPC 和数据库 TLS。请仅在带有备份的副本上使用。采用 AGPL-3.0-or-later 许可,由 HyScaler 开发。

HyScribe 是 WordPress 的早期 Rust 重新实现,宣称可作为直接替代品:单个用户态二进制文件,使用相同的 MySQL 数据库,用户可以随时切回。作者表示,插件和主题会单独移植,先从开源扩展开始;但评论者指出,目前还不能运行任何 PHP 插件,因此它并非真正的直接替代。怀疑者认为,WordPress 的价值主要在于插件和主题生态,而共享主机通常不允许运行自定义进程。也有人质疑其维护、商业模式以及对 AI/“氛围编程”的大量使用,称该项目是拿未完成品做营销。Rust 的优势——内存安全、性能、低内存占用和编译期严格性——也引发争论;有人认为静态站点、Astro、Keystatic、Cloudflare 或 EmDash 更实用。作者称,目标是在减少攻击面的同时保留 WordPress 的编辑体验。
相关文章

原文

HyScribe: a drop-in replacement for WordPress, written in Rust

A drop-in replacement for WordPress, written in Rust.

License: AGPL-3.0 Latest release Documentation

Website · Docs · Install · Latest release · Porting help

Point the hyscribe binary at an existing WordPress database and wp-content folder, answer a short setup wizard, and the site is served by a single native process. No PHP runtime, no schema migration, and the database stays readable by PHP WordPress, so you can switch back at any time.

PHP2Shell (October 2026) showed that every WordPress site can be compromised through the PHP runtime itself, with no plugin at fault. HyScribe keeps WordPress's data, URLs and ecosystem, and replaces the runtime with memory-safe Rust and sandboxed plugins. See docs/VISION.md.

Warning

Not yet production ready. HyScribe is an early release in active development: it has had no external security audit, parts of hs-admin and the REST API still answer 501 Not Implemented, and behaviour may change between releases. Try it on a copy of a site, not on a live one, and keep backups. See PROGRESS.md for where it stands.

The hs-admin dashboard of a HyScribe site, with the welcome banner and the familiar WordPress widgets

Your site, unchanged The same database, the same URLs, the same content and users. Nothing is migrated and no table is altered
No PHP to attack A memory-safe Rust core with secure defaults. No PHP file is ever run, and every parser of untrusted input is fuzzed (docs/SECURITY_MODEL.md)
Plugins in a sandbox Extensions run as WebAssembly packages with declared permissions, time and memory limits, instead of code with the run of the server
One binary A static build with no runtime dependency but the database. Unpack, start, finish setup in the browser
Checked against WordPress PHP WordPress is the test oracle: pages, REST answers and database writes are compared with what PHP produces
A way back PHP WordPress can read everything HyScribe wrote. A test suite proves it on every release

v0.1.0 (2026-11-26) is the current release. On the default WordPress install it drops in against the same database, serves it, writes to it through hs-admin and the REST API with the same checks as PHP, and hands it back to PHP WordPress with no check failing. The acceptance runs are recorded in docs/ACCEPTANCE.md.

Legend: ✅ working today, 🚧 in progress, 🔜 coming up, ❌ not supported.

Area Status What you get
Drop in on an existing site ✅ One binary and a setup wizard serve a WordPress 7.0 or 7.1 site from its database and wp-content, with no schema change
Pages match PHP WordPress ✅ On the default install, pages match PHP WordPress byte for byte
Switch back to PHP WordPress ✅ The database stays readable by PHP WordPress; checked by its own test suite
Block themes ✅ Twenty Twenty-Two to Twenty-Five are built in and switch from Appearance; a site on another theme is served with Twenty Twenty-Five
Blocks and formatting ✅ Core blocks, global styles and WordPress's text formatting, checked against PHP
hs-admin (/hs-admin/) ✅ The default install's screens: posts, pages, media, comments, categories and tags, users, settings
Block editor and site editor ✅ Writing and editing posts and pages; templates, template parts, patterns and global styles
Media and uploads ✅ Images with their sizes made, and documents, spreadsheets, presentations, archives, text and CSV, Word, Excel and PowerPoint 97 to 2003 files, PDFs (kept without preview images), MP3 files with their tags and cover pictures, and MP4, M4A, M4V, QuickTime and 3GPP files with their cover pictures; Ogg, FLAC, Windows Media, Matroska, AVI and FLV files answer 501 until their readers are ported
REST API ✅ Reads for most core routes; writes for posts, pages, templates, global styles, menus, patterns, terms, settings, comments and users
Login and users ✅ Login at /hs-login with existing accounts, lost and reset password, registration, roles and capabilities; logged in users see their private posts, drafts and previews on the site as each role does in PHP WordPress
Comments ✅ Posting and moderating
Mail ✅ Through an SMTP relay you configure
Scheduled jobs ✅ WordPress's six core jobs run in the service
Release archives ✅ Reproducible static builds for Linux x86_64 and arm64, and, from the release after v0.1.0, builds for macOS (Apple Silicon and Intel, not yet signed by Apple), with checksums, SBOMs and build provenance

Linux (x86_64 or arm64), or from the release after v0.1.0 macOS 11 and later (Apple Silicon or Intel) and Windows 10 and later (x86_64). You need an existing WordPress 7.0 or 7.1 site's database (MariaDB or MySQL) and its wp-content folder; try it on a copy.

# Linux: linux-amd64 or linux-arm64. macOS: darwin-arm64 (Apple Silicon) or darwin-amd64 (Intel)
curl -fLO https://github.com/hyscaler/HyScribe/releases/latest/download/hyscribe-latest-linux-amd64.tar.gz
curl -fLO https://github.com/hyscaler/HyScribe/releases/latest/download/SHA256SUMS.txt
sha256sum -c SHA256SUMS.txt --ignore-missing    # macOS: shasum -a 256 -c SHA256SUMS.txt --ignore-missing
gh attestation verify hyscribe-latest-linux-amd64.tar.gz --repo hyscaler/HyScribe
tar -xzf hyscribe-latest-linux-amd64.tar.gz && cd hyscribe
./hyscribe service start      # then finish setup in the browser

On macOS the binary is not signed by Apple yet, and the platform is tested less than Linux: read On macOS first. On Windows take hyscribe-latest-windows-amd64.zip and run hyscribe.exe service start, after reading On Windows.

On Linux, macOS or Windows with Docker, from the release after v0.1.0: the same binary in an image for amd64 and arm64, with a MariaDB beside it.

curl -fLO https://raw.githubusercontent.com/hyscaler/HyScribe/main/docker/compose.yaml
printf 'DB_PASSWORD=%s\n' "$(openssl rand -hex 24)" > .env
docker compose up -d
docker compose cp hyscribe:/hyscribe/logs/setup-secret . && cat setup-secret

Open http://127.0.0.1:8080/, enter the secret and tick "This is a new site" (database host db, name and user wordpress, the password from .env). The image is docker.io/hyscribe/hyscribe, also on GitHub Container Registry as ghcr.io/hyscaler/hyscribe. Docker covers a copy of an existing site, upgrades, backups and security.

The operator documentation, also shipped in the archive as hyscribe/docs/, covers installing, configuration, running the service, switching a site over and back, backups, upgrades, security and what is not supported yet: docs/operators/. The design behind it is in docs/DEPLOYMENT.md.

  • Your themes: the block themes Twenty Twenty-Two to Twenty Twenty-Five are built in. A site on another theme is served with Twenty Twenty-Five for now; classic themes are under way.
  • Your plugins: PHP plugins do not run, because there is no PHP. A plugin needs a port to the extension runtime, and no popular plugin is ported yet.
  • Need a custom theme or plugin ported? Write to [email protected].
  • Changed your mind? Stop HyScribe and start PHP WordPress on the same database. Switching a site over and back has the steps.
Area Status Where it stands
Classic themes 🚧 The host side is under way (the template hierarchy, the first template tags, the head and footer); the first port, Hello Elementor, is being built as a separate package
Plugins on the extension runtime 🚧 Plugins run as sandboxed WebAssembly packages: installing a signed local package, activating and deactivating work; the SDK is at 0.5, with admin pages, the settings API and REST routes, and no popular plugin is ported yet
Signed packages and the hosted registry 🚧 Signing, install by name and the update check are built (ADR 0024); they start working once the registry has its keys and address
The rest of hs-admin and the REST API 🚧 What is not ported answers 501 Not Implemented and still works in PHP WordPress on the same database: docs/operators/not-supported.md
Area Status Note
WordPress's PHP plugins ❌ They never run: HyScribe has no PHP runtime. A plugin needs a port to the extension runtime
Multisite ❌ Refused at start; planned (M9)
XML-RPC ❌ Planned (M9)
Database TLS ❌ Not supported yet

No dates: each step ships when its checks against PHP WordPress pass. The plan is in docs/MVP.md (phases) and docs/ROADMAP.md (milestones, with what is done and left in each).

Order What Status
1 Classic themes: Hello Elementor, then Twenty Twenty-One with nav menus, widget areas, theme mods and the Customizer 🚧
2 Installing themes 🔜
3 The rest of the plugin SDK: uploads, rewrite rules, plugins' own tables (admin pages and the settings API are in SDK 0.4, REST routes in 0.5) 🚧
4 Ports of three reference plugins: Contact Form 7, Yoast SEO, Elementor (its front end, then its editor) 🔜
5 A security review of the extension runtime, and the MVP's checks rerun with each theme and plugin 🔜
6 The hosted registry's keys and address, so install by name and update checks work 🔜
7 The compatibility scanner, hyscribe doctor and the new site installer 🔜
8 Agent porting of WordPress plugins and themes, with a public registry of ports 🔜
9 Multisite, XML-RPC, translations and caching 🔜
10 1.0: an external security audit, long fuzzing, benchmarks against PHP WordPress, more platforms and the upgrade path 🔜
Milestone Status Note
MVP: a drop-in replacement for a default install ✅ Met 2026-11-20, docs/ACCEPTANCE.md
M1 Foundations 🚧 The gates, configuration, service and release pipeline are done
M2 Setup wizard and compatibility scanner 🚧 The wizard for an existing site is done
M3 Read-only front end 🚧 The default install matches PHP
M4 Authentication and users 🚧 Login, sessions, roles and capabilities are done
M5 Write path (REST API, admin, media) 🚧 Most writes are done
M6 Extension SDK and runtime 🚧 The runtime, SDK 0.5 and signed packages are built
M7 Theme system 🚧 Block themes are done; classic themes are under way
M8 Agent porting pipeline 🔜 Not started
M9 Breadth 🚧 Cron runs in the service
M10 1.0 hardening and release 🔜 Not started

The live checklist is PROGRESS.md.

Is it ready for my live site?

Not yet. v0.1.0 is an early release with no external security audit, and parts of the admin and the REST API still answer 501 Not Implemented. Run it on a copy of a site and keep backups.

Does it change my database?

No table is altered and nothing is migrated. HyScribe writes only what PHP WordPress would write, which is checked against PHP for every kind of write.

Can I go back to PHP WordPress?

Yes, at any time. The database stays readable by PHP WordPress, and a switch-back test suite runs on every release.

Will my plugins work?

Not as they are. WordPress's PHP plugins never run on HyScribe. Plugins are ported to sandboxed WebAssembly packages on HyScribe's extension SDK; the runtime and SDK 0.5 are in this release, and the first ports are on the roadmap. For help porting your own, write to [email protected].

Which WordPress versions and themes?

Sites on WordPress 7.0 or 7.1. The block themes Twenty Twenty-Two to Twenty Twenty-Five are built in; classic themes are in progress.

What does it cost?

Nothing. HyScribe is open source under the AGPL-3.0-or-later licence.

Rust throughout: one static binary serves the site, hs-admin and the REST API over MariaDB or MySQL. Extensions run on a WebAssembly component runtime. PHP WordPress is used only as the test oracle.

reference/default-install/db.sh up        # MariaDB with a fresh WordPress 7.1 install
cargo build --release -p hyscribe
mkdir -p try && cp target/release/hyscribe try/
printf 'DB_HOST=127.0.0.1\nDB_PORT=33061\nDB_NAME=wordpress\nDB_USER=wordpress\nDB_PASSWORD=reference-only\nWP_HOME=http://127.0.0.1:8080\n' > try/.env
chmod 600 try/.env && try/hyscribe service start   # then open http://127.0.0.1:8080/

The build downloads the pinned WordPress release from wordpress.org with curl and unpacks its wp-includes with tar, after checking its SHA-256, so the build host needs both and network access. For an offline build, point HYSCRIBE_WORDPRESS_TARBALL at a copy of wordpress-7.1.3.tar.gz.

Rust stable 1.99 or later.

cargo test --workspace                 # all tests
cargo llvm-cov --workspace --ignore-filename-regex '/tests/' \
  --fail-under-lines 100 --fail-under-regions 100   # the coverage gate
cargo mutants --workspace              # mutation testing
cargo deny check                       # licenses, advisories, sources
reference/default-install/build.sh     # rebuild the default install fixture
scripts/package.sh x86_64-unknown-linux-musl dist   # release archive (on a Mac: aarch64-apple-darwin)
scripts/smoke-test.sh dist/hyscribe_*_linux_amd64.tar.gz   # install it and run the service

Every change ships with tests, and coverage stays at 100% (docs/TESTING.md).

Bug reports, compatibility reports, docs fixes, tests and code are welcome: see CONTRIBUTING.md and the Code of Conduct. Report vulnerabilities privately, as SECURITY.md says.

The code is AGPL-3.0-or-later. See LICENSE and ADR 0004.

HyScribe is developed and supported by HyScaler. A copy or a fork keeps that attribution, as NOTICE says.

The HyScribe name and logo are not covered by that licence; see brand/README.md.

WordPress is a registered trademark of the WordPress Foundation. HyScribe is an independent project and is not affiliated with, sponsored by or endorsed by the WordPress Foundation or Automattic.

联系我们 contact @ memedata.com