docs(as): document the __<fn>_impl entry seam + fix the Install example - #21
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the generated-entry-dispatch section otigen's AS codegen needs as its canonical reference: the
__<fn>_implauthor 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:
sload/sstore/emit_event/hash_poseidon2from@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 withElement 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.Docs only — no code, no ABI, no package surface change.