explaingit

qewer33/ratscad

Analysis updated 2026-06-24

98RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Terminal-based OpenSCAD editor written in Rust with live 3D preview rendered inline using the Ratty terminal graphics protocol.

Mindmap

mindmap
  root((ratscad))
    Inputs
      OpenSCAD source files
      Keyboard and mouse input
    Outputs
      Live 3D preview
      Saved scad files
    Use Cases
      Edit OpenSCAD in terminal
      View 3D model inline
      Iterate parametric CAD designs
    Tech Stack
      Rust
      Ratatui
      Bevy
      wgpu
      OpenSCAD
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Edit OpenSCAD models inside a terminal with syntax highlighting

USE CASE 2

Preview 3D CAD output without leaving the shell

USE CASE 3

Iterate parametric 3D designs using keyboard-driven UI

USE CASE 4

Run a CAD workflow over SSH on a remote machine

What is it built with?

RustRatatuiBevywgpuOpenSCAD

How does it compare?

qewer33/ratscadl0ng-ai/paprazw413/glass
Stars988879
LanguageRustRustRust
Setup difficultymoderateeasymoderate
Complexity3/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Inline 3D preview only works inside the Ratty terminal emulator, and openscad must be on PATH on macOS or Windows.

MIT license, free to use, modify, and distribute commercially with attribution.

In plain English

ratscad is a code editor that runs in a terminal window and shows a live 3D preview of the model you are editing, also inside the terminal. It is built for OpenSCAD, which is a programming language for designing solid 3D objects by writing code rather than by clicking shapes in a graphical CAD program. The author marks the project as experimental and asks users to report bugs they hit. It is written in Rust and uses Ratatui, a library for building text user interfaces. The 3D preview is shown using something called the Ratty Graphics Protocol, which is a way for a special terminal emulator named Ratty to draw inline 3D objects right inside a normal-looking terminal pane. Because the protocol is specific to Ratty, the 3D preview only appears when you launch ratscad inside that terminal, although the text editor part still works elsewhere. The editor side offers tabs with syntax highlighting, a dirty marker to show unsaved changes, click-to-switch tabs, a file menu popup with the usual New, Open, Save, Save As, Close, and Quit, and a path prompt for opening or saving files. The preview pane shows the model with an isometric default view and an X/Y/Z axis gizmo in the corner. You can rotate, pan, and zoom with the keyboard or with mouse drag and scroll, and there is a fullscreen preview mode. A bottom toolbar shows the relevant shortcuts at any moment. Under the hood, ratscad runs two threads. One handles the user interface and input. The other waits for changes in the source code, holds back for a short delay so it does not rebuild on every keystroke, then runs the openscad command-line program, pipes the source in, and reads the resulting 3D mesh back. The mesh is converted into a format suitable for the Ratty renderer, which uses Bevy and wgpu for the actual graphics, and includes a per-document cache so that switching tabs without edits skips the rebuild. Installation is through Cargo with cargo install ratscad. On Linux x86_64 it can download a recent OpenSCAD build automatically, on macOS and Windows you need openscad on your PATH or pointed at by the OPENSCAD_BIN environment variable. The project is shared under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through installing ratscad with Cargo and getting the inline 3D preview working in the Ratty terminal
Prompt 2
Show how the two-thread architecture of ratscad pipes source into openscad and reads the mesh back
Prompt 3
Build a minimal OpenSCAD example I can open in ratscad to test the preview pane
Prompt 4
Explain how the per-document cache in ratscad avoids rebuilds when switching tabs

Frequently asked questions

What is ratscad?

Terminal-based OpenSCAD editor written in Rust with live 3D preview rendered inline using the Ratty terminal graphics protocol.

What language is ratscad written in?

Mainly Rust. The stack also includes Rust, Ratatui, Bevy.

What license does ratscad use?

MIT license, free to use, modify, and distribute commercially with attribution.

How hard is ratscad to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ratscad for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.