ADM Bot

Programming Language

One language for apps,
services, and interfaces.

ADM is statically typed and compiles to native binaries. Contracts, transactions, background services, and UI components are part of the language - not libraries you bolt on.

warehouse.adm
module inventory {
	struct Item {
		@trim()
		name  string
		stock int
	}

	def restock(item Item, qty int) !Item {
		expects {
			assert qty => 0 onerror fail "quantity must be positive"
			assert item.name != ""
		}
		return Item{name: item.name, stock: item.stock + qty}
	}
}

application Warehouse {

	def new(args string[]) int {
		use inventory

		let item = inventory.Item{name: "widget", stock: 12}
		let updated = inventory.restock(item, 8) onerror recover item

		match updated.stock {
			case (n); n > 15:
				println("well stocked: {updated.stock}")
			default:
				println("low stock: {updated.stock}")
		}

		return 0
	}
}

What's in the box

Structured

Structs, enums, unions, interfaces, and datatypes for describing data. Interfaces and datatypes are satisfied implicitly - no implements clause.

Expressive

Pattern matching, string interpolation, async/await, and channels. Errors are values: !T to return one, try to pass it up, onerror to handle it.

Native

Compiles ahead of time for Linux, macOS, Windows, Android, iOS, and WASM. SIMD vectors and forall - a loop that spreads across CPU cores - are language-level.

Download

ADM ships as a single self-contained package: the compiler, the standard library and a bundled C toolchain. The standard library still has gaps; read the docs or browse the examples to see where it's heading.

Install with one command (current user, no sudo):

curl -fsSL https://raw.githubusercontent.com/admlang/adm/main/install.sh | sh

Installs into ~/.adm and adds ~/.adm/bin to your PATH. Later, adm update fetches new releases. Prefer to do it by hand? Grab the adm-<version>-linux-amd64.tar.gz from the latest release, unpack it anywhere and put its bin/ on PATH. The IntelliJ plugin is on the same page.