NOTE: The binary and source links mentioned in this article
will not be populated until the 0.0.0-alpha
release.
Please do not attempt to follow these instructions until
this notice has been removed.
NOTE: The prebuild binaries are all in English. If you'd like a non-english verison of the compiler, please scroll down to Installing from Source
The only dependencies for installing garter from binary
is a program capable of downloading the file,
such as wget
or curl
.
lin386
or lina32
binary.$PATH
.
We personally recommend either ~/.local/bin
or /usr/local/bin
.For users on x86 systems looking for a system-wide install:
wget https://modula.dev/garter/lin386
mv lin386 /usr/local/bin/garter
mac686
or maca64
binary.$PATH
.
We personally recommend either ~/bin
or /usr/local/bin
.For users on x86 systems looking for a system-wide install:
curl https://modula.dev/garter/mac686 -o mac686
mv mac686 /usr/local/bin/garter
win686
or wina64
binary.$PATH
.
A common directory for user-level programs is C:\Users\<YourUsername>\AppData\Local\Programs
.$PATH
if not already included.
Press Win + R
, type sysdm.cpl
to open the System Properties utlity and press Enter.
Go to the Advanced tab and click on Environment Variables.
Under User variables or System variables, find the Path
variable and click Edit.
Add the path to the directory containing the binary to the list of paths.
Click OK on all dialogs to save your changes.garter
.
Then open your terminal (cmd) and type garter -v
.
If the binary is properly installed and in $PATH
,
you should see a message telling you what version of
garter is now installed on your system.The instructions for building from source are mostly the same
from system to system assuming you already have a C compiler installed.
The only dependencies for builing and bootstrapping garter are
a C compiler with standard libraries,
and either git
for cloning this repo,
or both tar
for unzipping and your choice of CLI for downloading it.
From hereon, we'll be referring to your system's C compiler as cc
.
Replace that name with whatever compiler you personally have.
wget
and tar
.cgarter.c
with a define-flag
for the language you want it built with.
For example, to get a Spanish garter compiler,
run cc -o garter cgarter.c -D SPANISH
$PATH
.Alternatively, if you'd like to build a self-hosted garter compiler:
wget
and tar
.cgarter.c
with a define-flag
for the language you want it built with.
For example, to get an English garter compiler,
run cc -o cgarter cgarter.c -D ENGLISH
cgarter
to build self-hosted garter from
the source file found in /assets
.
The localization will have been set when building
cgarter
, so you don't have to worry about defining
the language during self-hosting.
If you are building for x86 BSD, the build command might look like
cgarter ./assets/garter.gy garter -f lin686
$PATH
.Both bootstrapping and self-hosted versions will include the compiler, assembler, linker, the standard library, and the package manager. If you would like a local copy of the language's documentation, it is available in PDF or HTML forms from our website at modula.dev/documentation in English, Spanish, and French.