# maintainer as of 31/10/2019 # dhorsley@gmail.com SCRIPT EXECUTION ---------------- path_to_binary/za -or- Add a hashbang line and chmod your script to u+x. LANGUAGE INSTALLATION FROM BINARY --------------------------------- Copy za binary file to whichever path you want it to live on. Alternatively, keep it local to where your script is. It doesn't matter either way, it's self contained. LANGUAGE INSTALLATION FROM SOURCE --------------------------------- PREREQUISITES - Go compiler - v1.21+ - if building for Alpine: upx compression tool - lib-pcre3: if building for Arch/Alpine, then this is not required. - lib-pcre3 is required for the reg*() Za library functions. - these are not installed by default in Arch/Alpine so are not present in those build versions. - sqlite3 dev/header files - this db engine is not currently supported in Arch as you need to use the alpine build which disables CGO. For debian, redhat and similar builds as well as FreeBSD and similar you should be fine generating a 'normal' glibc build. For Debian, Ubuntu, Redhat and similar: --------------------------------------- - first install: If required, adjust ./GO to suitable paths, then: ./GO # only if needed go build za cp -f za /usr/bin/ # or whereever you want it - subsequent rebuild/update/install: ./build [upx] [strip] -or- ./build libc [upx] [strip] If the rebuild fails, then run go build za for better output. the language version number will not appear at run-time unless compiled using the "build" script To cross-compile for Alpine (default): -------------------------------------- ./build alpine [upx] [strip] If you have UPX installed then the upx option above can be used to compress the binary for docker builds. To compile for Arch: -------------------- ./build arch strip upx Note: The default in most cases should be to use the strip and upx options for most linux/bsd platforms. This takes the installable binary size down to a much smaller artifact size for distribution, which is possibly going to be a container in many cases. It makes more sense to compact the binary and let the operating system take care of caching it if called multiple times than it does to inflate container sizes for the sake of a milliseconds faster interpreter startup. To cross-compile for Windows: ----------------------------- If compiling on an Ubuntu host: ./build win This option leaves the binary unstripped so that Windows 10 doesn't complain too much. Windows support may or may not be entirely broken, sub-par, slightly broken or even fully functional at any given time. There is no support for these builds and they are provided as a best-effort solution. Additionally, some minor features are not present in Windows where there is no clear parallel option. Also underwhelming in the Windows version: - ANSI support in interactive mode: windows default consoles just ain't great at it. To compile on FreeBSD: ---------------------- ./build The OS should be detected by the build script. You should still do your initial build using the first install instructions above. you can add the bsd option if it is not auto-detected.