Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Tooling overview

Edge's tooling is centered around the compiler CLI, the installer, and the language server.

edgec

edgec is the main command-line entry point for the compiler. It can compile contracts directly to EVM bytecode or stop after earlier phases for inspection.

edgec examples/counter.edge
edgec lex examples/counter.edge
edgec parse examples/counter.edge
edgec check examples/counter.edge
edgec lsp

Subcommands

SubcommandDescription
lex <FILE>Lex file and print tokens (debug output)
parse <FILE>Parse file and print AST (debug output)
check <FILE>Compile for errors without producing output
lspStart the LSP server over stdin/stdout

Compiler flags

Flag / OptionShortDefaultDescription
<FILE>Source file to compile (outputs hex bytecode to stdout)
--output-oWrite raw bytecode bytes to file (requires FILE)
--emit <KIND>bytecodetokens / ast / ir / pretty-ir / asm / bytecode
-O <LEVEL>0Optimization level (0–3)
--optimize-forgasOptimization target: gas or size
--std-pathFilesystem stdlib path (also: EDGE_STD_PATH env var)
--verbose-vVerbosity; repeat for more: -v=WARN, -vv=INFO, -vvv=DEBUG, -vvvv=TRACE
--versionPrint version and exit
--help-hPrint help

Verbosity levels

-v countLog levelNotes
0(off)No tracing output
1WARN
2INFO
3DEBUG
4+TRACEegglog also set to TRACE (otherwise WARN)

Emit output behavior

EmitStdoutFile (-o)
tokensDebug print of each Token
astDebug print of Program
irS-expression format
pretty-irPretty-printed IR
asmLabeled block assembly
bytecode0x<hex> stringRaw bytes

edgeup

edgeup is the Edge toolchain manager. Install it first, then use it to install and manage edgec versions.

# 1. Install edgeup
curl -fsSL https://raw.githubusercontent.com/refcell/edge-rs/main/etc/install.sh | sh
 
# 2. Install the Edge compiler
edgeup install

Supported platforms: Linux x86_64, macOS x86_64, macOS arm64. Windows is not supported.

edgeup detects your shell (bash, zsh, or fish) and appends ~/.edgeup/bin to your PATH in the appropriate RC file (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish). Restart your shell or run the printed source command after installation.

Directory layout

~/.edgeup/
  bin/
    edgec          ← symlink → versions/{tag}/edgec
  versions/
    v0.1.6/
      edgec        ← actual binary (chmod 755)
    v0.1.7/
      edgec

edgeup subcommands

SubcommandDescription
install [VERSION]Download and install Edge toolchain (default: latest)
updateAlias for install — installs latest version
listList all installed versions
use <VERSION>Switch active version (updates symlink)
uninstall [VERSION]Remove a version, or all if omitted
self-updateUpdate edgeup itself to the latest release
versionPrint the edgeup version

LSP

Edge ships an LSP server for editor integration:

edgec lsp

The server communicates over stdin/stdout and provides parse and type-check diagnostics with precise source spans.

Repository utilities

The repository ships a Justfile with common contributor workflows:

CommandDescription
just buildBuild all crates (cargo build --workspace)
just testRun all tests (cargo test --workspace)
just lintRun all lints (format, clippy, deny, docs)
just e2eRun end-to-end tests
just benchRun benchmarks
just docsServe the Vocs documentation site locally
just docs-buildBuild the documentation site
just check-examplesParse all example contracts
just check-stdlibParse all stdlib contracts

Reference material

For runnable contracts and language samples, see the examples/ and std/ directories.