What RedMachine works with, and what is still preview
This post lists what RedMachine works with, how each part was checked, and where our evidence stops. Where something was checked only in a limited way, or only under emulation, it says so.
Languages that are built in
Five groups have their own test and check commands built in.
- Rust, with Cargo:
cargo test --workspace --quiet. - Python: pytest when it can be imported, otherwise
python3 -m unittest. - JavaScript and TypeScript, with npm:
npm test. TypeScript and JSX files also need atsconfig.jsonandtsc. - Go:
go test. - Swift packages and Xcode projects, in preview (below).
The language's own tools must be on your PATH. Each changed file is judged with the commands of the project file above it, so a change to a JavaScript front end and a Rust back end in one repository is judged as two projects.
The evidence differs by language. We ran RedMachine on example projects in Rust, Python and Go. For JavaScript and TypeScript, the evidence is RedMachine's own automated tests, which exercise those languages. For Swift packages it is those tests and two runs of the packaged program on a 119-line SwiftUI screen in a package. Xcode projects are covered by tests run against real Xcode, and by runs of the packaged program on an iPhone app project with 9 edited lines.
Other languages
Any other language can be judged with your own commands: --ext for the file extensions, --test for the test command and --check for a command that says whether a broken file still builds. We ran this on a shell script. With your own commands the breaks are plain text swaps, and some are crude. RedMachine does not recognise test files there, so you leave them out with --exclude.
Changed files of a kind with no built-in support, such as .kt, .java and .cs, fail the run until you judge them with --ext or leave them out with --exclude. RedMachine says so rather than passing quietly.
Platforms
- macOS: one program for Apple silicon and Intel.
- Linux: static programs for x86_64 and arm64.
- Windows: through WSL 2, with the Linux program. You follow the Linux install steps inside a WSL 2 shell.
Each of the final programs went through the same 20-step check: version and help, listing, the licence messages, a Python repository that gave one KILLED and one SURVIVED line with a receipt, and verify on that receipt. All 20 steps passed on all four platforms. The details matter, so here they are:
- Run as themselves: the macOS program on Apple silicon with macOS 27.2, and the Linux x86_64 program on Windows through WSL 2 (Linux 6.6).
- Run under emulation: the Intel half of the macOS program ran under Rosetta on Apple silicon, and was not run on an Intel Mac. The Linux arm64 program ran under qemu, not on arm64 hardware.
Xcode project support was built and tested with current Xcode on Apple silicon only.
What preview means
Swift and Xcode support is a preview. That means it is new in this version. The timings below come from one iPhone app with 9 edited lines and one SwiftUI screen of 119 lines in a Swift package, and we have timed nothing else. Its SwiftUI rules read text rather than parse code. It has not yet been measured on a 16 GB Mac.
What it does today, on a Mac with Xcode, a simulator runtime for your app and a unit-test target with at least one passing test:
- It judges iPhone, iPad and Mac apps, and Apple TV apps. Apple Watch and Vision Pro apps are coming soon, and a run on one stops and says so. Physical devices are never used.
- It works in a copy of your project, on its own simulator named "redmachine tests (do not use)". Your files, Xcode, your previews and your own simulators never see a broken line.
- On an iPhone app with 9 edited lines, a cold build took a median of 6.5 seconds over four builds, and each of 24 judged lines in three runs took 5.0 to 12.2 seconds.
Apart from the preview, there is a limit of the idea itself. Unit tests cannot reach SwiftUI view code, so lines RedMachine judges there usually survive. On an ordinary new 119-line screen with no view tests, 51 lines were judged: 40 SURVIVED and 11 UNVIABLE. A unit test that renders a view and compares the picture with a stored one can kill view lines. On one SwiftUI view we tried, with 5 counted lines, every counted line whose break builds was killed. That is one view, and it is not a general result.
Some things are not judged at all. UI tests are not run for each line, and a changed text such as Text("Hello") in a view is left out. Objective-C, C, C++ and Metal files in an Xcode project fail the run until you leave them out with --exclude.
Price during the preview
$79 while Swift and Xcode support is in preview. $99 when it leaves preview. You can find the terms and the buy page, and the questions and answers on the questions page. To see how an assistant fits into a run, read using RedMachine with a coding assistant.