- src/manifest.zig: strict aji.toml subset ([package], [capabilities], [metadata]); errors with line numbers - aji run --manifest: entry relative to the manifest, manifest grants replaced per parameter by --grant; usage error on manifest problems - examples/packages/hello as a runnable package, checked in CI - implemented_phase = 2; Phase 2 exit review; README and AGENTS updated
77 lines
2.1 KiB
LLVM
77 lines
2.1 KiB
LLVM
module examples.hello
|
|
air 0
|
|
lang 0.1
|
|
features [arrays, capabilities, effects, ownership, resources]
|
|
|
|
fn @main(%out: cap<io.write>) -> void
|
|
effects [io.write]
|
|
entry:
|
|
%msg = local.alloc array<u8, 11>
|
|
local.zero %msg
|
|
%msg_m = borrow.mut %msg
|
|
%msg_i0 = const.usize 0
|
|
%msg_c0 = const.u8 104
|
|
%msg_e0 = borrow.index %msg_m, %msg_i0
|
|
store %msg_e0, %msg_c0
|
|
borrow.end %msg_e0
|
|
%msg_i1 = const.usize 1
|
|
%msg_c1 = const.u8 101
|
|
%msg_e1 = borrow.index %msg_m, %msg_i1
|
|
store %msg_e1, %msg_c1
|
|
borrow.end %msg_e1
|
|
%msg_i2 = const.usize 2
|
|
%msg_c2 = const.u8 108
|
|
%msg_e2 = borrow.index %msg_m, %msg_i2
|
|
store %msg_e2, %msg_c2
|
|
borrow.end %msg_e2
|
|
%msg_i3 = const.usize 3
|
|
%msg_c3 = const.u8 108
|
|
%msg_e3 = borrow.index %msg_m, %msg_i3
|
|
store %msg_e3, %msg_c3
|
|
borrow.end %msg_e3
|
|
%msg_i4 = const.usize 4
|
|
%msg_c4 = const.u8 111
|
|
%msg_e4 = borrow.index %msg_m, %msg_i4
|
|
store %msg_e4, %msg_c4
|
|
borrow.end %msg_e4
|
|
%msg_i5 = const.usize 5
|
|
%msg_c5 = const.u8 44
|
|
%msg_e5 = borrow.index %msg_m, %msg_i5
|
|
store %msg_e5, %msg_c5
|
|
borrow.end %msg_e5
|
|
%msg_i6 = const.usize 6
|
|
%msg_c6 = const.u8 32
|
|
%msg_e6 = borrow.index %msg_m, %msg_i6
|
|
store %msg_e6, %msg_c6
|
|
borrow.end %msg_e6
|
|
%msg_i7 = const.usize 7
|
|
%msg_c7 = const.u8 97
|
|
%msg_e7 = borrow.index %msg_m, %msg_i7
|
|
store %msg_e7, %msg_c7
|
|
borrow.end %msg_e7
|
|
%msg_i8 = const.usize 8
|
|
%msg_c8 = const.u8 106
|
|
%msg_e8 = borrow.index %msg_m, %msg_i8
|
|
store %msg_e8, %msg_c8
|
|
borrow.end %msg_e8
|
|
%msg_i9 = const.usize 9
|
|
%msg_c9 = const.u8 105
|
|
%msg_e9 = borrow.index %msg_m, %msg_i9
|
|
store %msg_e9, %msg_c9
|
|
borrow.end %msg_e9
|
|
%msg_i10 = const.usize 10
|
|
%msg_c10 = const.u8 10
|
|
%msg_e10 = borrow.index %msg_m, %msg_i10
|
|
store %msg_e10, %msg_c10
|
|
borrow.end %msg_e10
|
|
borrow.end %msg_m
|
|
%msg_r = borrow.ref %msg
|
|
%msg_s = slice.make %msg_r
|
|
intrinsic io.stdout_write(%out, %msg_s), ok -> @done, err -> @failed
|
|
done:
|
|
borrow.end %msg_s
|
|
borrow.end %msg_r
|
|
ret
|
|
failed(%e: io_error):
|
|
trap
|