1
0
Fork
You've already forked prism-template
0
Template repository for prism projects
2026年06月30日 14:37:12 +10:00
deps/World Minimal work template 2026年06月30日 14:37:12 +10:00
lib Minimal work template 2026年06月30日 14:37:12 +10:00
modules Minimal work template 2026年06月30日 14:37:12 +10:00
src Minimal work template 2026年06月30日 14:37:12 +10:00
prism.toml Minimal work template 2026年06月30日 14:37:12 +10:00
README.md Minimal work template 2026年06月30日 14:37:12 +10:00

prism-template

Template repository for prism projects

Usage

Create a repository using this as a template.

To build the project run prism build in the project root.

Why

To have a working example of a prism repository using modules and the prism.toml project file.

prism.toml explained

The prism.toml file defines the project.

Only package.name and bin.entry are needed to compile a project succesfully.

A minimal example would be the uncommented parts below:

[package]
name = "hello_world"
# src = "modules/"
# prelude = "lib/prelude.pr"
[bin]
entry = "hello.pr"
# [dependencies]
# World = { path = "deps/World" }
  • package.name: defines the name of the binary generated with prism build.
  • bin.entry: the path to the file containing the main entry function.
  • package.src: Path relative to the project root that contains modules available to be imported.
  • package.prelude: Path relative to the project root that contains a module replacing the standard prelude. Any funtion exported with a name from the standard prelude will override that function.
  • dependencies: A list of name = { path = "..."} of modules that can be imported by the program.