# Lane Explorer

> Write Lane as text or as a node graph and see the code generated for each instruction set, with the compiler running in your browser.

The Explorer is a page of this site, [/explorer/](/explorer/): the program as text and as a node graph, and the generated code for each instruction set. The compiler is one WebAssembly module that runs in a Web Worker in your browser, so nothing is uploaded and there is no server to store anything on.

- Three views: Text, Text + graph and Graph. The graph shows the syntax tree of the same program as nodes, and editing it regenerates the canonical text; the compiler checks the tree exactly as it checks text.
- A drop zone: drop a Lane file, several files or a folder on the page to open them. Nothing is uploaded.
- A selector for the instruction set: x86-64, AArch64, wasm32, wasm64, RISC-V 64, SPIR-V.
- An optimization level selector next to the instruction-set selector. It offers the levels the compiler lists for the selected instruction set and starts at the highest.
- Each instruction in a listing is linked to the source line it came from and to the nodes of that line, and the other way round.
- Diagnostics are listed above the generated code in every view, as plain lines: path:line:col: error: message, and are underlined in the editor.
- A program is shared by a URL fragment that holds the compressed source, the instruction set and the optimization level.

The page needs JavaScript. The compiler takes its input as an in-memory module map and answers with a listing; the interface is the same one the command line uses with build --asm --isa <target> -O<level>.
