Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Official ZPE/YASS documentationCompiling projects and bundling resources

ZPE can compile an entire directory as one YASS project. All .yas files below the project root are combined in deterministic path order, while non-source files are bundled as project resources.

Project layout

Project directory
my-project/
  main.yas
  lib/
    people.yas
  resources/
    settings.json
    logo.png
  

Keep generated files and secrets outside the project root unless they are deliberately intended to become part of the compiled application.

Compiling a project

Select the project directory as the compilation input. ZPE detects that the input is a directory, combines its YASS sources and embeds its other files. Host applications can perform the same work through ZPEKit's project-directory reading and compilation methods.

Running or debugging a source directory from the command line requires the --directory option. This prevents a directory from being accepted accidentally where an ordinary source file was intended.

Bundled resources

Use get_resource to obtain a safe path to a file relative to the project root:

YASS
$settings_path = get_resource("resources/settings.json")
$settings = file_read($settings_path)
  

In source mode the path resolves beneath the source project's root. In a compiled application it resolves to the corresponding bundled resource. Unsafe paths and missing resources return undefined.

Excluding functions from compiled applications

Place @compile false immediately before a function to omit that function from the compiled executable:

YASS
@compile false
function development_helper()
  print("Development only")
end function
  

The function remains available during normal interpreted execution and HYPR execution; only compiled-application output omits it.

Its implementation was made available in ZPE 1.14.9 (Spurriergate, September 2026).

Comments

There are no comments on this page.

New comment

Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.

Comments powered by BalfComment

Feedback 👍
Comments are sent via email to me.