aboutsummaryrefslogtreecommitdiffhomepage
path: root/src-runtime/slul-interfaces/slulrt.slul
blob: 499ffb41de0452f443f019d54bd69f04c811d06b (plain)
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
47

#
# Interface for the SLUL runtime (slulrt)
#
# Copyright © 2023-2024 Samuel Lidén Borell <samuel@kodafritt.se>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

\slul 0.0.0
\name slulrt
\type libraryspec
\version 0.0.0
\api_def 0.0.0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# The main class of an application.
# This is an opaque type (managed by the runtime),
# but all applications should define a main method in it, like this:
# SlulApp.main() -> SlulExitStatus
since 0.0.0
type SlulApp

# A SlulArena controls a memory arena.
since 0.0.0
type SlulArena

# The return value of an app. Used to indicate success/error.
since 0.0.0
type SlulExitStatus = int

since 0.0.0
data SlulExitStatus .success = 0        # No error
since 0.0.0
data SlulExitStatus .error = 1          # Generic error code
since 0.0.0
data SlulExitStatus .invalid_args = 2   # Invalid command-line arguments