5 Glow How-To
5.1 How to Get Help about Glow
For community help, join our Discord channel (invite).
For commercial support, contact us directly at [email protected].
5.2 How to Install Glow
5.2.1 Easy Install for End-Users
In the next few months, we will compile Glow fully to a single JavaScript file, served from our website, that you can also copy and serve locally.
We will include a canary message on the website to warn about legal tampering; but for serious deployment, you should check the JavaScript file and verify it matches what auditors you trust did vouch for.
5.2.2 Easy Install for Developers
Currently, Glow is available for installation on Linux and macOS. To install, open a terminal and type or copy/paste the following command line, then restart your terminal after it’s done to get the updated configuration:
curl -L https://glow-lang.org/install/glow-install | sh |
This command will download about 2GB of programs and data using the Nix package manager. On Intel x86_64 it should download pre-compiled binary packages. On other architectures, it may take quite some time to compile everything. It may or may not work on Windows Subsystem for Linux (WSL).
5.2.3 Easy Install Using Docker
docker pull mukn/glow:alpha |
docker run -it mukn/glow:alpha bash |
This will give you a shell in which to try running glow.
5.2.4 Installing the Hard way
See in our source repository INSTALL.md for full instructions on installing Glow for those who want to modify the language implementation itself.
If so, you should also read HACKING.md for guidelines on making such modifications and rebuilding the software. And, of course, join our Discord channel (invite) to discuss with our developer community.
5.3 How to Write or Use Custom DApps
Put your .glow files in a directory somewhere, and include it in your GLOW_PATH. See below for more explanations.
To specify a file for use at the start of an interaction, refer to it by its relative path to the top directory included in the GLOW_PATH. Note that every participant in an interaction must have a copy of the exact same file at the exact same relative path, to be able to interact successfully using Glow.
The GLOW_PATH is the environment variable of that name when defined, which should be a colon-separated list of absolute filesystem paths. If your GLOW_PATH isn’t defined, it will contain the glow/dapps subdirectory of each of your XDG_DATA_HOME (which defaults to ~/.local/share under Linux or BSD Unix, but ~/Library under macOS, and your LocalAppData folder under Windows), and each directory in your colon-separated XDG_DATA_DIRS (which defaults to /usr/local/share:/usr/share under Unix including macOS, and your AppData and CommonAppData folders under Windows), followed by the dapps directory of your Glow installation. (Note that Windows is not currently supported except maybe through WSL which then counts as Unix. Please contact us if you want to make native Windows support happen.)
If you use the default GLOW_PATH configuration, we suggest you use the glow/dapps subdirectory of your XDG_DATA_HOME (see above) to store the .glow application file.
If you wish to modify the GLOW_PATH yet fallback to the default, you can query the default value with glow default-glow-path, and e.g. in your ~/.bash_profile include a configuration line such as: export GLOW_PATH="$HOME/glow-dapps:$(glow default-glow-path)"
Glow is a rapidly changing language, so please inquire on our Discord channel (invite) for the latest ways to write and use contracts.
5.4 How do I run a .glow interaction from my programming language?
If you’re using Gerbil Scheme as your programming language, you have direct access to all the Glow API.
If you’re using another programming language, you must spawn a glow start-interaction command as a subprocess from your language and interact with it. All languages have at least a shell escape, and can thereby run a Glow interaction. We’re actively working to improve the user interface, so please come on our channel to ask for help, and we’ll make sure your needs are fulfilled.
In the near future, we will also offer a JSON-RPC interface to Glow’s services, that you can also invoke from any language, probably more easily. Finally, we are actively working to deliver Glow directly to the JavaScript ecosystem.