From 555b4f7b979a3d2af38c161392941d87b263d8a5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 16 Jun 2026 21:20:13 +0000 Subject: [PATCH 1/2] docs: add Cursor Cloud setup instructions in AGENTS.md Co-authored-by: Kian McKenna --- AGENTS.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..58e5535 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,26 @@ +# AGENTS.md + +## Cursor Cloud specific instructions + +Glass is a single Rust crate (edition 2024) — a terminal Markdown editor (TUI) built with +Ratatui. There are no services, databases, or network ports; it's a self-contained binary. + +### Toolchain caveats (non-obvious) +- Edition 2024 requires a recent stable Rust (≥ 1.85). The pre-baked image may ship an older + default toolchain; the environment is set up to use `stable` (currently 1.96). +- The `tree-sitter-markdown` dependency compiles C++ via `cc-rs`. On this image the default + `cc`/`c++` alternatives point at `clang`, and `clang` is invoked with + `--target=x86_64-unknown-linux-gnu`, which fails to locate the GNU libstdc++ headers + (`fatal error: 'cassert' file not found`). The environment fixes this by switching the + `cc`/`c++` alternatives to GCC (`update-alternatives --set c++ /usr/bin/g++`, + `--set cc /usr/bin/gcc`). If you ever hit a `cassert`/C++ stdlib build error, re-apply that, + or build with `CC=gcc CXX=g++ cargo build`. + +### Lint / test / build / run +Authoritative checks mirror `.github/workflows/ci.yml`: +- Format/lint: `cargo fmt --all -- --check` +- Tests: `cargo test --locked` (inline `#[cfg(test)]` modules; no `tests/` dir) +- Build (dev): `cargo build`; release: `cargo build --release --locked` +- Run interactively (needs a TTY): `cargo run -- ` or `./target/release/glass ` +- Headless/automated rendering (no TTY): `./target/release/glass --render [--width N] [--height N] ` + also auto-renders when stdout is piped/redirected. Use this for non-interactive verification. From b47561270dd3f3742b47c49f1edcf8f7b122d462 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 16 Jun 2026 22:01:43 +0000 Subject: [PATCH 2/2] docs: note Ghostty as preferred terminal for manual TUI testing Co-authored-by: Kian McKenna --- AGENTS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 58e5535..ad28712 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,3 +24,9 @@ Authoritative checks mirror `.github/workflows/ci.yml`: - Run interactively (needs a TTY): `cargo run -- ` or `./target/release/glass ` - Headless/automated rendering (no TTY): `./target/release/glass --render [--width N] [--height N] ` also auto-renders when stdout is piped/redirected. Use this for non-interactive verification. + +### Manual GUI testing +- Use the **Ghostty** terminal emulator for interactive/manual testing of the TUI (preferred). + It's installed and registered as `x-terminal-emulator`; launch with `ghostty &`. +- Ghostty runs over OpenGL via the GTK runtime; it works in the VM's software renderer. The + GTK/cgroup/empty-config warnings it prints at startup are harmless and don't affect the editor.