The Dewy programming language

Tools for the edit loop

Check a program, run it, inspect it, and repeat with the current compiler.

Run, check and build

dewy check hello.dewy
dewy hello.dewy
dewy build hello.dewy --release -o hello
dewy build hello.dewy --target wasm32 -o hello-web
dewy
dewy watch hello.dewy

With no file, dewy starts the interactive prompt at a terminal and runs a program piped to it otherwise. The prompt and watch command are part of the compiler. Native watch reruns after source changes. Web builds emit an HTML runner.

VS Code and the language server

Install the Dewy extension. Set dewy.core.path to a standalone bin/dewy-core or the checkout’s absolute tools/dewy path.

The extension provides unsaved diagnostics, completion, hover, definitions and formatting through dewy lsp, plus native test tasks and CodeLLDB integration. This page does not promise a complete rename, references, semantic-token, inlay-hint or test-explorer experience. See the extension guide.

Tests and formatting

dewy test project.dewy
dewy test --watch project.dewy
dewy fmt project.dewy
dewy build project.dewy -g -o project-debug

Mark test functions with $test:

add = (a:int64 b:int64) => a+b

$test
adds_numbers = () => $expect add(20 22) =? 42

The website checks this declaration; the project guide describes executing tests.

A rejected example

let value:int64 = "not a number"

The website requires this source to fail checking with a diagnostic. Exact diagnostic wording may evolve.