Skip to content
You are reading next, which describes the unreleased compiler. Khora is unstable before v1: syntax, standard-library APIs and behavior may change. The current release is documented under v0.4.

std::permissions::grants

What khora.toml granted, as Khora.

This file is replaced at build time. khora build reads the whole [permissions] table – fs, env, network and process alike – and writes this module out with the manifest’s own patterns in all five functions below; what is on disk is the default, which grants everything.

It is a file of its own so that the replacement is a whole file rather than surgery on one: the matcher in std::permissions is real code that nothing generated should be editing, and a compiler that rewrites a function body inside a file it does not otherwise understand is a compiler that breaks the next time somebody reformats it.

A missing [permissions] table grants everything. That is opt-in tightening rather than a tax on starting, and it is why the defaults here are wildcards rather than nothing: ** for the two path grants, which spans separators, and * for env, network and process, whose subjects are single names.

Functions: fs_read · fs_write · env · network · process

pub fn fs_read() -> List<String>

Paths this program may read.

pub fn fs_write() -> List<String>

Paths this program may write.

pub fn env() -> List<String>

Environment variables this program may read.

pub fn network() -> List<String>

Hosts this program may reach, as name or name:port.

pub fn process() -> List<String>

Programs this program may run, by name.

Khora 0.4.0built frombd964738afb6on 2026-10-17 20:41ZVersioningSecurityContributingReleasesSource