Skip to content

docs(as): document the __<fn>_impl entry seam + fix the Install example - #21

Merged
zarah-s merged 1 commit into
mainfrom
as-sdk/phase-2-entry-seam-docs
Jul 30, 2026
Merged

docs(as): document the __<fn>_impl entry seam + fix the Install example#21
zarah-s merged 1 commit into
mainfrom
as-sdk/phase-2-entry-seam-docs

Conversation

@manoahLinks

Copy link
Copy Markdown
Member

Adds the generated-entry-dispatch section otigen's AS codegen needs as its canonical reference: the __<fn>_impl author seam, the full otigen.toml → AssemblyScript type-mapping table, the index.ts + abort wiring, the signature-drift rules, and how the seam is opted into and out of.

Also corrects two things the Phase 1 consolidation (#18) left stale:

  • The Install example imported sload / sstore / emit_event / hash_poseidon2 from @pyde-net/host/assembly. Since refactor(as): consolidate the AS SDK into assemblyscript/ (one package, like go/ and rust/) #18, index.ts re-exports the ergonomic wrappers and the raw externs live behind /assembly/raw, so that snippet fails with Element not found — the first thing a new author would copy. Replaced with both subpaths and why they're split; the replacement was compiled with asc to confirm every name resolves.
  • The opening claimed "One file, no runtime code, no external dependencies". All three stopped being true with the borsh / codec / u128 / ctx / calldata / exit / hash modules and the as-bignum dependency, and it contradicted the codecs the new section documents.

Docs only — no code, no ABI, no package surface change.

Adds the generated-entry-dispatch section otigen's AS codegen needs as its
canonical reference: the `__<fn>_impl` author seam, the full otigen.toml →
AssemblyScript type-mapping table, the index.ts + abort wiring, the
signature-drift rules, and how the seam is opted into and out of.

Also corrects two things the Phase 1 consolidation (#18) left stale:

- The Install example imported `sload` / `sstore` / `emit_event` /
  `hash_poseidon2` from `@pyde-net/host/assembly`. Since #18, index.ts
  re-exports the ergonomic wrappers and the raw externs live behind
  `/assembly/raw`, so that snippet fails with `Element not found` — the
  first thing a new author would copy. Replaced with both subpaths and
  why they're split; the replacement was compiled with asc to confirm
  every name resolves.
- The opening claimed "One file, no runtime code, no external
  dependencies". All three stopped being true with the borsh / codec /
  u128 / ctx / calldata / exit / hash modules and the as-bignum
  dependency, and it contradicted the codecs the new section documents.

Docs only — no code, no ABI, no package surface change.
@zarah-s
zarah-s merged commit d168621 into main Jul 30, 2026
0 of 5 checks passed
@zarah-s
zarah-s deleted the as-sdk/phase-2-entry-seam-docs branch July 30, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants