Install
One file. The compiler, the formatter, the test runner and the language server are all in it, and there is nothing else to install.
Take the file for your machine
| Machine | File |
|---|---|
| Linux, 64-bit Intel or AMD | deed-v0.2.3-x86_64-unknown-linux-gnu.tar.gz |
| macOS, Apple silicon | deed-v0.2.3-aarch64-apple-darwin.tar.gz |
| Windows, 64-bit | deed-v0.2.3-x86_64-pc-windows-msvc.zip |
From the latest release. There is no Intel Mac build and no Linux ARM build; on those, build from source.
Unpack it and ask it what it is
Pick the one for your machine and run it as written. The last line is what you should see.
Linux
$ tar xzf deed-v0.2.3-x86_64-unknown-linux-gnu.tar.gz
$ ./deed-v0.2.3-x86_64-unknown-linux-gnu/deed --version
deed 0.2.3
macOS
$ tar xzf deed-v0.2.3-aarch64-apple-darwin.tar.gz
$ xattr -d com.apple.quarantine deed-v0.2.3-aarch64-apple-darwin/deed
$ ./deed-v0.2.3-aarch64-apple-darwin/deed --version
deed 0.2.3
The middle line is not optional and it is explained below.
Windows
> Expand-Archive deed-v0.2.3-x86_64-pc-windows-msvc.zip .
> .\deed-v0.2.3-x86_64-pc-windows-msvc\deed.exe --version
deed 0.2.3
What your operating system will say about it
These binaries are not code-signed. Signing needs a certificate tied to an identity, and there is not one yet, so both macOS and Windows will treat the download as something they have never seen.
macOS marks anything a browser downloaded with a
quarantine attribute, and refuses to run an unsigned, unnotarised
binary that carries it. Depending on the version you get
“cannot be opened because the developer cannot be
verified” or the process is killed with no explanation at
all. Removing the attribute is the xattr line above, and
it is worth understanding rather than pasting: it says you accept
this file from where you got it.
Windows shows “Windows protected your PC” if you double-click the executable in Explorer. More info, then Run anyway. Starting it from a terminal, as above, is the shorter path.
Linux says nothing. The archive carries the execute
bit; if you rebuilt it or copied it in a way that dropped the mode,
chmod +x deed.
Where to put it
Anywhere. It reads nothing next to itself and writes nothing beside
itself. To type deed instead of a path, move it onto
yours:
$ sudo mv deed-v0.2.3-x86_64-unknown-linux-gnu/deed /usr/local/bin/deed
On Windows, put the folder on Path through Settings, or
keep using the full path. Nothing on this page needs it on
Path.
A first program
Put this in a file called hello.deed:
module hello
fn main(sys: System) -> Int
uses
Io.write,
{
Io.write(sys.console, "hello, world\n")
0
}
Then:
$ deed check hello.deed
$ deed run hello.deed
hello, world
check printing nothing is the answer. It found no
problem, so it has nothing to say, and it exits 0. Anything it does
print is a diagnostic, and it will point at the byte it means.
The playground runs the same compiler in a browser tab, so you can try things there without any of this.
From source
Needs Rust 1.85 or newer, and nothing else:
$ git clone https://github.com/deed-lang/deed
$ cd deed
$ cargo install --path crates/deed-cli
The workspace has no external dependencies, so this compiles what is in the tree and nothing from anywhere else.
When it does not work
cannot execute binary file: Exec format error-
The file is for a different machine than the one running it. Check
the table above against
uname -m. deed: command not found-
It is not on your
PATH. Run it by path, with the./, or move it as above. --versionprints something other than 0.2.3-
You are running a different
deedthan the one you unpacked.which deedsays which. - It prints a diagnostic you do not understand
-
deed explain DEED5001, with the code it printed. Every code has a page. - Anything else
- Open an issue with the command you ran and everything it printed. A confusing message is a bug in the message.