1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! The half of the host standard library that needs no grant at all.
//!
//! Exists as its own example because every other example on the grant axis shows a module earning
//! authority, and the roster's larger half never asks for any: `regex`, `path`, `hash`, `time` and
//! `glob.match` compute over the arguments they are handed. Reading only those examples leaves the
//! impression that a script under an empty grant set cannot do anything, when in fact it can do
//! most text work — which is the case this one puts in front of the reader.
//!
//! Responsibilities: running one script under [`Policy::pure`] — the tightest preset, granting
//! nothing and dropping `os` — and showing that the whole sweep below still runs under it.
//!
//! Non-responsibilities: the text work itself. `toolkit.lua` is the subject here and the host is
//! deliberately thin; a Rust file that reproduced the calls would be demonstrating `mlua` instead.
use Error;
use Path;
use ;