implements PLN-0053
This commit is contained in:
+29
-2
@@ -61,7 +61,7 @@ as the normative runtime-facing identity.
|
||||
|
||||
The host-binding pipeline is:
|
||||
|
||||
1. User code imports SDK surfaces such as `Gfx` from `@sdk:gfx`.
|
||||
1. User code imports SDK surfaces such as `Gfx` from `@sdk:gfx` and `Composer` from `@sdk:composer`.
|
||||
2. The compiler resolves those surfaces against the selected stdlib line.
|
||||
3. The compiler maps each host-backed SDK member to a canonical identity `(module, name, version)`.
|
||||
4. The compiler emits those required canonical identities into the PBX `SYSC` table.
|
||||
@@ -136,6 +136,33 @@ but the PBX-facing declaration is canonical, for example:
|
||||
("gfx", "draw_pixel", 1)
|
||||
```
|
||||
|
||||
The same rule applies to sprite composition through the composer domain.
|
||||
For example, the PBS-facing declaration:
|
||||
|
||||
```pbs
|
||||
declare host LowComposer {
|
||||
[Host(module = "composer", name = "emit_sprite", version = 1)]
|
||||
[Capability(name = "gfx")]
|
||||
fn emit_sprite(
|
||||
glyph_id: int,
|
||||
palette_id: int,
|
||||
x: int,
|
||||
y: int,
|
||||
layer: int,
|
||||
bank_id: int,
|
||||
flip_x: bool,
|
||||
flip_y: bool,
|
||||
priority: int
|
||||
) -> int;
|
||||
}
|
||||
```
|
||||
|
||||
maps to the canonical runtime identity:
|
||||
|
||||
```text
|
||||
("composer", "emit_sprite", 1)
|
||||
```
|
||||
|
||||
The same rule applies to the low-level asset surface.
|
||||
For example, the PBS-facing declaration:
|
||||
|
||||
@@ -396,7 +423,7 @@ Diagnostics should identify the failing canonical identity whenever available.
|
||||
|
||||
Rules:
|
||||
|
||||
- the loader does not resolve source imports such as `@sdk:gfx`,
|
||||
- the loader does not resolve source imports such as `@sdk:gfx` or `@sdk:composer`,
|
||||
- the loader only consumes canonical host-binding metadata emitted into the PBX,
|
||||
- `stdlib` affects the loader indirectly through what the compiler emitted,
|
||||
- the loader must not attempt to reconstruct SDK/module semantics from the PBX.
|
||||
|
||||
Reference in New Issue
Block a user