glistix add glistix_example
import glistix_example
pub fn main() {
// TODO: An example of the project in use
}
Note: This is a Glistix project, and as such may require the Glistix compiler to be used.
Further documentation can be found at https://hexdocs.pm/glistix_example.
To import this project from Nix, first fetch its source (through a Flake input,
using builtins.fetchGit
, cloning to a local path, or some other way), import
the Flake or the default.nix
file, and run lib.loadGlistixPackage { }
.
For example:
let
# Assuming the project was cloned to './path/to/project'
glistix_example = import ./path/to/project;
# Use 'loadGlistixPackage { module = "module/name"; }' to pick a module
package = glistix_example.lib.loadGlistixPackage { };
result = package.main { };
in result
nix develop # Optional: Spawn a shell with glistix
glistix run # Run the project
glistix test # Run the tests