Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lpil/gleescript
🌮 Bundle your Gleam-on-Erlang project into an escript, a single executable file!
https://github.com/lpil/gleescript
Last synced: 21 days ago
JSON representation
🌮 Bundle your Gleam-on-Erlang project into an escript, a single executable file!
- Host: GitHub
- URL: https://github.com/lpil/gleescript
- Owner: lpil
- Created: 2023-12-21T20:30:02.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-17T12:05:19.000Z (5 months ago)
- Last Synced: 2024-10-13T22:54:56.878Z (about 2 months ago)
- Language: Gleam
- Homepage:
- Size: 23.4 KB
- Stars: 42
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-gleam - gleescript - [📚](https://hexdocs.pm/gleescript/) - Bundle your Gleam-on-Erlang project into an escript, a single executable file! (Packages / Build Tooling)
README
# gleescript
Bundle your Gleam-on-Erlang project into an escript, a single executable file!
You may find this useful for writing command line programs and scripts in
Gleam.[![Package Version](https://img.shields.io/hexpm/v/gleescript)](https://hex.pm/packages/gleescript)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/gleescript/)## Usage
Add this package to your Gleam project and run `gleam run -m gleescript` to
generate an escript.```sh
gleam add gleescript
gleam run -m gleescript
# Compiling your_project
# Compiled in 0.26s
# Running gleescript.main
# Generated ./your_project./your_project
# Hello from your_project!
```The escript can run on any computer that has the Erlang VM installed. Older
versions of the virtual machine may not support the newer bytecode contained in
the escript. Typically being within a couple major versions of the version used
to build the escript is safe.See the [Erlang escript documentation][1] for more information.
[1]: https://www.erlang.org/doc/man/escript.html
By default the executable is created in the current directory. The `--out` flag
can be used to write to a different directory.```sh
gleam run -m gleescript -- --out=./some/directory
# Compiling your_project
# Compiled in 0.26s
# Running gleescript.main
# Generated ./some/directory/your_project./some/directory/your_project
# Hello from your_project!
```Have fun!