Skip to content

lhmouse/asteria

This branch is 1 commit ahead of, 14 commits behind master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7c9cce1 Â· Jan 19, 2025
Jan 19, 2025
Mar 14, 2022
Aug 27, 2024
May 6, 2024
Jan 27, 2024
Mar 26, 2024
Sep 2, 2024
Mar 26, 2024
Mar 11, 2024
Oct 23, 2023
Jan 27, 2024
Apr 13, 2020
Mar 23, 2018
Jul 25, 2024
Aug 10, 2023
Aug 10, 2023
Aug 10, 2023
Apr 7, 2024
Apr 11, 2024
Nov 4, 2024
Feb 15, 2024
Mar 13, 2024

Repository files navigation

The Asteria Programming Language

Compiler Category
GCC 7 🥇Primary
Clang 11 🥈Secondary

asteria

Asteria is a procedural, dynamically typed programming language that is highly inspired by JavaScript.

The most notable difference between Asteria and other languages is that the so-called 'objects' have value semantics. That is, an object is copied when it is passed to a function by value or is assigned to a variable, just like values of primitive types.

How to Build

First, you need to install some dependencies and an appropriate compiler, which can be done with

# For Debian, Ubuntu, Linux Mint:
# There is usually an outdated version of meson in the system APT source. Do
# not use it; instead, install the latest one from pip.
sudo apt-get install ninja-build python3 python3-pip pkgconf g++  \
        libpcre2-dev libssl-dev zlib1g-dev libedit-dev uuid-dev
sudo pip3 install meson
# For MSYS2 on Windows:
# The `iconv_open()` etc. functions are provided by libiconv. Only the MSYS
# shell is supported. Do not try building in the MINGW64 or UCRT64 shell.
pacman -S meson gcc pkgconf pcre2-devel openssl-devel zlib-devel  \
        libiconv-devel libedit-devel libutil-linux-devel
# For macOS:
# The `gcc` command actually denotes Clang, so ask for a specific version
# explicitly.
brew install meson pkgconf gcc@10 pcre2 openssl@3 zlib libedit
export CXX='g++-10'

Then we can build as usual

meson setup build_debug
meson compile -Cbuild_debug

Finally we launch the REPL, as

./build_debug/asteria

README

If you need only the library and don't want to build the REPL, you may omit libedit from the dependencies above, and pass -Denable-repl=false to meson.

License

BSD 3-Clause License