Skip to content

docs: add Rust rewrite feasibility issue draft#1

Open
DU4DAMA wants to merge 1 commit intomasterfrom
codex/evaluate-golang-to-rust-code-transition-feasibility
Open

docs: add Rust rewrite feasibility issue draft#1
DU4DAMA wants to merge 1 commit intomasterfrom
codex/evaluate-golang-to-rust-code-transition-feasibility

Conversation

@DU4DAMA
Copy link

@DU4DAMA DU4DAMA commented Mar 19, 2026

Motivation

  • Assess the feasibility, cost, and risks of replacing all Go code in the repository with Rust by mapping the current codebase and Rust ecosystem alternatives.
  • Surface the largest migration blockers (SQLite driver/DB abstraction, JS VM plugin system, and Go library embedding model) and estimate work effort and phases.
  • Provide maintainers a concise in-repo Issue draft to kick off discussion and to recommend safer alternatives (PoC, partial Rustization, or keep Go mainline).

Description

  • Added docs/issues/rust-rewrite-feasibility.md, a comprehensive Chinese draft Issue that documents repository metrics (44 packages, 442 Go files, ~37.9k prod LOC / ~56.6k test LOC), hotspots (core/, tools/, apis/, plugins/jsvm/) and the Go-native integration points.
  • Mapped major capability domains to Rust crate options (e.g. axum/tokio/tower-http, rusqlite/sqlx, clap, oauth2, boa_engine/rquickjs, lettre, image, opendal) and explained where one-to-one replacements do not exist (notably dbx, modernc.org/sqlite semantics and goja+goja_nodejs behavior).
  • Provided phased work estimates (PoC, core, API, files, scripts, testing/release), rough engineering effort estimates (roughly 60–100 engineer-weeks for a feature-aligned rewrite; 18–30 engineer-months to reach parity with high confidence), clear recommendations against a full-mainline rewrite, and proposed next steps (2–4 week PoC or targeted Rustization of hot paths).
  • Committed the draft with the message docs: add Rust rewrite feasibility issue draft so maintainers can open/adjust the content as a GitHub Issue or ADR.

Testing

  • Ran git diff --check to validate there are no whitespace/format errors in the change, and it completed successfully.
  • Verified the change was staged and committed using git status --short and git rev-parse --short HEAD, and confirmed a new commit was created; no unit-test changes were required for this documentation-only addition.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant