Skip to content

docs(lez): extensions pages follow the derived embedding surface - #2

Open
mmlado wants to merge 2 commits into
docs/freeze-authority-rfp-002from
feat/derived_embedding
Open

docs(lez): extensions pages follow the derived embedding surface#2
mmlado wants to merge 2 commits into
docs/freeze-authority-rfp-002from
feat/derived_embedding

Conversation

@mmlado

@mmlado mmlado commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Description

Updates the extensions section to the derived embedding surface. The pages track the feat/derived_embedding branches of spel, spel-admin-authority and spel-freeze-authority, and merge when those do. Content assumes the final situation, dependency snippets stay unpinned on purpose.

Changes

  • admin-authority.md: embedded mode is two declarations, #[admin_slot] on the embedding field and #[initialize] on the account-creating instruction. The module marker goes bare, the offset derives from the marked field, and the agreement rules are spelled out: a marked field with no anchored instruction refuses to build and the reverse refuses too. The kwarg forms are gone, the explicit #[admin_initialize] stays documented as the fallback for instructions creating several accounts.
  • freeze-authority.md: freeze declares a no-op anchor, so its marker goes bare as well. The embedded example carries one #[initialize] for both extensions, expanded in marker order, admin's bootstrap and freeze's no-op both running. Offsets lose their kwargs everywhere, the slot markers are the only source.
  • build-a-spel-extension-library.md: the embedded-mode section documents the anchor metadata (anchor_attr, anchor_role), the no-op anchor pattern for slots that start empty, and the shorthand from the author's perspective, nothing to implement, document both spellings. A new section, "Account layouts in the consumer's IDL", records the connected-sources contract: annotated layouts land in accounts, referenced types in types, only connected code contributes layouts, transitive crates are inert, duplicate layout names refuse, and cfg-gated items are screened out.

mmlado added 2 commits August 14, 2026 10:55
The role kwarg was the only embedded declaration freeze had, and a
marked freeze_slot field without it compiled silently as dedicated
mode with a dead slot field. The extension now declares
freeze_initialize as its anchor. The attribute expands to nothing,
the slot stays born vacant, and the marker goes bare in both modes.
The missing_freeze_initialize fixture pins the refusal from the
vacant-slot side. ADR-0013 records the decision.
One attribute stands for every activated extension's anchor, expanded
in marker order. The explicit attributes stay documented as the
fallback for instructions that create several accounts.
@mmlado mmlado closed this Aug 21, 2026
@mmlado mmlado reopened this Aug 21, 2026
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.

1 participant