Skip to content
AlexDicyPublic

About

Ens (Easy native syntax) compiler

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1,931 Commits

Folders and files

Repository files navigation

Ens

Ens is a compiled programming language with automatic reference counting, checked exceptions, flow-sensitive nullability, and per-instantiation generics.

Installing

Download ens for your machine from the releases.

Windows

The folder below is one Windows puts on PATH.

cmd /c move ens-windows-x64.exe "%LOCALAPPDATA%\Microsoft\WindowsApps\ens.exe"

macOS

Needs macOS 15 or later. A file a browser downloaded is quarantined until the mark is removed.

chmod +x ens-macos-arm64
xattr -d com.apple.quarantine ens-macos-arm64
sudo mv ens-macos-arm64 /usr/local/bin/ens

Linux

chmod +x ens-linux-x64
sudo mv ens-linux-x64 /usr/local/bin/ens

Building your first program with Ens

Save this as hello.ens:

main() -> int {
    print("Hello, world!");
    return 0;
}

Build it into an executable named hello:

ens build hello.ens

Or build and run it in one step:

ens run hello.ens

--target builds for another machine, here a Linux one:

ens build hello.ens --target x86_64-unknown-linux-gnu

The first build writes the standard library and the files a link needs into ~/.ens/cache.

Building and testing

xmake build ens-llvm
xmake test

ens-llvm is the one static library ens links for LLVM and lld: the linker bridge every Ens program links through, together with LLVM itself, and the only C++ a build of Ens needs. xmake test builds ens from source with the seed committed for this platform under seed/, then runs the whole suite through it.

Editor support

  • tools/vscode/ - VS Code extension (TextMate highlighting + ens-lsp).
  • tools/intellij/ - IntelliJ plugin (TextMate highlighting + ens-lsp via LSP4IJ).
  • tools/grammar/ - canonical TextMate grammar and language configuration shared by both.

About

Ens (Easy native syntax) compiler

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages