Skip to content

modoterra/echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Echo

Echo is a compiled language implemented in Rust. It uses a single LLVM backend and a Rust-owned runtime for both AOT native binaries and in-process JIT execution.

The command-line entrypoint is xo.

Status

Echo is early-stage software. The workspace is scaffolded for full vertical slices (frontend → semantics → IR → codegen → runtime → CLI). Language features are implemented incrementally with focused proofs.

Language design (in progress)

Keyword-free, statement-led core — see docs/syntax.md.

Tree Role
examples/misc/ Tiny xo run demos (print, loops, lists, result)
examples/app/ HTTP demo + kitchen-sink surface
examples/algos/ Classic algorithms (factorial, sort, primes, …)
std/ Standard library Echo sources (IO, TCP, HTTP stubs)
cargo build -p xo
./target/debug/xo run examples/misc/hello.echo
./target/debug/xo run examples/misc/sum_list.echo ; echo exit:$?
./target/debug/xo check examples/app/surface.echo

Track discussion in docs/roadmap.md.

Documentation

Doc Role
AGENTS.md Workflow and invariants for humans/agents
docs/README.md Full docs map
docs/architecture.md Pipeline and crate ownership
docs/glossary.md Shared vocabulary
docs/development-speed.md Local tools and gate
docs/adr/ Architecture decisions

Layer specs (docs/syntax.md, docs/parser.md, …) accumulate rules as each layer lands.

Workspace

See docs/architecture.md for crate ownership and the compilation pipeline.

  • Frontend: echo_source, echo_diagnostics, echo_syntax, echo_lexer, echo_ast, echo_parser, echo_semantics
  • IR and backend: echo_hir, echo_mir, echo_codegen, echo_codegen_abi, echo_runtime, echo_std
  • Project tooling: echo_index, echo_resolver, echo_fingerprint, echo_cache, echo_build, echo_reflection, echo_lsp
  • CLI: xo

Requirements

  • Rust with edition 2024 support
  • LLVM 22 when codegen is active (inkwell)
  • clang and mold for native link speed
  • sccache for compile caching
  • cargo-nextest and just for the local gate

See docs/development-speed.md for setup and the edit/test loop.

Build and test

cargo check --workspace
scripts/gate changed --list
scripts/gate changed
scripts/gate workspace
just tools

CLI surface (commands land as the language grows):

cargo run -p xo -- --help
cargo run -p xo -- lex <file>
cargo run -p xo -- ast <file>
cargo run -p xo -- ir <file>
cargo run -p xo -- run [--jit] <file>
cargo run -p xo -- build <file> -o <out>

Website

The public site lives in www/ (Vite, React, Tailwind). Minimal content, same layout and style as the product site.

npm --prefix www install
npm --prefix www run dev
npm --prefix www run lint
npm --prefix www run format
npm --prefix www run build
# or
just web-dev
just web-build
scripts/gate web

License

MIT (to be added with the first release commit if not present).

About

Echo is a Rust implementation of a PHP superset. Existing PHP should stay familiar, while Echo adds a modern runtime, compiler tooling, native concurrency, parallel execution, and a path toward compiled binaries with predictable performance gains.

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Contributors