Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.
Rust agent-skillsclaude-codeclicode-migrationcodexffigolangjavajavascriptmcpmigrationnapiperformanceportingpyo3pythonrewriterubyrusttypescript
docs(website): update the English language support pages (#1230)
RRFZae833370f916
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 81777f5d..9e633907 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -81,6 +81,9 @@- `app front-door` names the folder it read as a library when it finds no exports. It shows how torecord a CLI or server first and asks library users to check the root folder (#1194, #1222 by@Plastic-time).+- The English language overview lists all eleven supported languages. The PHP and C# pages+ describe unit bridges and the overview lists the verified runs for both (#1196, #1230 by+ @Plastic-time).- A `known-diffs.jsonl` that is not UTF-8, such as the UTF-16 file Windows PowerShell 5's `>` and`Out-File` write, now stops `diff`, `gate`, `enable`, `card` and `report` with an error thatnames the file. Before, it read as an empty list, so its entries were dropped without a worddiff --git a/tests/skill.rs b/tests/skill.rsindex 6640d3a9..b08c22f1 100644--- a/tests/skill.rs+++ b/tests/skill.rs@@ -162,6 +162,74 @@ fn every_command_the_skill_names_exists() {);}+#[test]+fn english_website_language_overview_matches_the_status_table() {+ let overview = include_str!("../website/pages/en/docs/languages/overview.md");+ let status = include_str!("../docs/STATUS.md");+ let (front, body) = overview.split_once("\n---\n").unwrap();+ let intro = body+ .lines()+ .find(|line| !line.is_empty() && !line.starts_with('#'))+ .unwrap();+ let mut gaps = Vec::new();++ for language in rust_anything::lang::Lang::ALL {+ let name = language.name();+ if !front.contains(name) || !intro.contains(name) {+ gaps.push(format!(+ "{name} is missing from the introduction or metadata"+ ));+ }+ let source_label = format!("| {name} |");+ let expected = status+ .lines()+ .find(|line| line.starts_with(&source_label))+ .and_then(|line| line.split('|').nth(2))+ .map(str::trim)+ .unwrap();+ let website_link = format!("| [{name}](");+ let shown = body+ .lines()+ .find(|line| line.starts_with(&source_label) || line.starts_with(&website_link))+ .and_then(|line| line.split('|').nth(2))+ .map(str::trim);+ if shown != Some(expected) {+ gaps.push(format!("{name} should be listed as {expected}"));+ }+ }++ assert!(gaps.is_empty(), "{}", gaps.join("\n"));+}++#[test]+fn english_website_php_and_csharp_pages_describe_unit_bridges() {+ for (language, page) in [+ (+ "PHP",+ include_str!("../website/pages/en/docs/languages/php.md"),+ ),+ (+ "C#",+ include_str!("../website/pages/en/docs/languages/csharp.md"),+ ),+ ] {+ assert!(+ page.lines()+ .any(|line| line == format!("title: {language}")),+ "{language} has an outdated title"+ );+ assert!(page.lines().any(|line| line == format!("# {language}")));+ let today = page+ .lines()+ .find(|line| line.starts_with("| Today |"))+ .unwrap();+ assert!(+ today.contains("Unit bridges") && today.contains("whole apps"),+ "{language} omits a supported workflow: {today}"+ );+ }+}+#[test]fn links_between_skill_files_resolve() {let mut broken = Vec::new();diff --git a/website/pages/en/docs/languages/csharp.md b/website/pages/en/docs/languages/csharp.mdindex c9bb4676..5c5aa987 100644--- a/website/pages/en/docs/languages/csharp.md+++ b/website/pages/en/docs/languages/csharp.md@@ -1,15 +1,15 @@----title: C# (preview)-description: C# is in preview. analyze reads .csproj projects, and a C# CLI or ASP.NET server can be recorded, replayed and put behind a Rust front door.+title: C#+description: Bridge public static C# methods to Rust, or record and replay a CLI or ASP.NET server.----# C# (preview)+# C#| | || --- | --- || Unit | a folder of `public static` methods || Bridge | a JSON dispatcher over P/Invoke |-| Today | whole apps: `app record`, `app replay` and the front door, for CLIs and ASP.NET servers (`dotnet <app>.dll`) |+| Today | Unit bridges and whole apps. Use `app record`, `app replay` and the front door for CLIs and ASP.NET servers (`dotnet <app>.dll`). || Status | Verified on Google.Protobuf 3.29.0's `CodedOutputStream.ComputeSize.cs`: 2,941/2,941 with 2 lone-surrogate cases in `known-diffs.jsonl`, gate passes; no `shadow`, no `--batch` |`analyze` reads `.csproj` projects and their NuGet packages (mapped to crates), resolves `using` directives to folders, and flags what C# does differently: `decimal`, `dynamic`, LINQ's deferred queries, `Task`, `lock`, reflection.diff --git a/website/pages/en/docs/languages/overview.md b/website/pages/en/docs/languages/overview.mdindex 1b4c5eea..52c92061 100644--- a/website/pages/en/docs/languages/overview.md+++ b/website/pages/en/docs/languages/overview.md@@ -1,17 +1,17 @@---title: Languages-description: TypeScript/JavaScript, Python, C, Go, Ruby and Java, with PHP and C# in preview. The unit, the bridge and the recorder for each.+description: The unit, bridge and recorder for TypeScript/JavaScript, Python, C, Go, Ruby, Java, Kotlin, PHP, C#, PowerShell and Swift.---# Languages-Six languages go through the whole loop: Node.js (TypeScript/JavaScript), Python, C, Go, Ruby and Java. PHP and C# are in preview: `analyze` and whole apps today, unit bridges next.+rust-anything bridges units and records behavior for TypeScript/JavaScript, Python, C, Go, Ruby, Java, Kotlin, PHP, C#, PowerShell and Swift.<!-- include: docs/languages.md#languages -->## Status per language-| Language | Status | Last real run |+| Language | Status | Run or fixture || --- | --- | --- || [TypeScript/JavaScript](/docs/languages/typescript) | Verified | json-server, Fuse.js, vercel/ms, x18n's `packages/core` || [Python](/docs/languages/python) | Verified | `colorsys.py` from CPython 3.13: 2,400/2,400 |@@ -19,7 +19,10 @@ Six languages go through the whole loop: Node.js (TypeScript/JavaScript), Python| [Ruby](/docs/languages/ruby) | Verified | `shellwords.rb` from Ruby 3.3: 1,617/1,617 || [Java](/docs/languages/java) | Verified | JDK 21 behind a facade: 4,492/4,492 || [C](/docs/languages/c) | Verified | glibc behind a facade: 1,859/1,859 after dropping one undefined-behavior case |-| [PHP](/docs/languages/php) | Preview | `analyze` and whole apps only |-| [C#](/docs/languages/csharp) | Preview | `analyze` and whole apps only |+| Kotlin | Tested | Gradle unit fixture |+| [PHP](/docs/languages/php) | Verified | PEAR `XML_Util` 1.4.5: 1,838/1,838, gate passes |+| [C#](/docs/languages/csharp) | Verified | Google.Protobuf 3.29.0 `CodedOutputStream.ComputeSize.cs`: 2,941/2,941, gate passes |+| PowerShell | Tested | `.psm1` module fixture |+| Swift | Tested | SwiftPM unit fixture |The full table, with the commands, is on the [Status](/docs/project/status) page.diff --git a/website/pages/en/docs/languages/php.md b/website/pages/en/docs/languages/php.mdindex bfd7f69c..14c544e6 100644--- a/website/pages/en/docs/languages/php.md+++ b/website/pages/en/docs/languages/php.md@@ -1,15 +1,15 @@----title: PHP (preview)-description: PHP is in preview. analyze plans a PHP app, and a PHP CLI or server can be recorded, replayed and put behind a Rust front door.+title: PHP+description: Bridge PHP functions and supported static methods to Rust, or record and replay a PHP CLI or server.----# PHP (preview)+# PHP| | || --- | --- |-| Unit | a folder of functions and `public static` methods |+| Unit | a file or folder of top-level functions or supported `final` classes || Bridge | a JSON dispatcher over `ext-ffi` |-| Today | whole apps: `app record`, `app replay` and the front door, for CLIs and servers (`php -S`) |+| Today | Unit bridges and whole apps. Use `app record`, `app replay` and the front door for CLIs and servers (`php -S`). || Status | Verified on PEAR `XML_Util` 1.4.5 behind a facade: 1,838/1,838, gate passes; no `shadow`, no `--batch`, no `profile` |`analyze` plans a PHP app: Composer packages and PSR-4 autoloading, risks such as loose comparison and integer overflow into floats, and Composer packages mapped to crates. Types come from PHP types and phpdoc.@@ -23,6 +23,8 @@ rust-anything app replay .rust-anything app front-door .```-Top-level functions with scalar, string, list and assoc-array parameters bridge through PHP's FFI; static methods, classes, objects, references, variadics, callables and generators stay in PHP with the reason.+Top-level functions with scalar, string, list and assoc-array parameters bridge through PHP's FFI.+Supported `final` classes can also bridge their public static methods. Functions using objects,+references, variadics, callables or generators stay in PHP with the reason.CI installs PHP only on macOS, so the PHP tests run in CI there and skip on Linux and Windows.