Skip to content

docs: document export_name attribute - #1296

Merged
peter-jerry-ye merged 4 commits into
mainfrom
codex/document-export-name-attribute
Jul 30, 2026
Merged

docs: document export_name attribute#1296
peter-jerry-ye merged 4 commits into
mainfrom
codex/document-export-name-attribute

Conversation

@peter-jerry-ye

@peter-jerry-ye peter-jerry-ye commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add #export_name to the attributes reference with its placement and naming constraints
  • recommend #export_name for new exports, while retaining exports for backend-specific export sets or names
  • document that export declarations and configuration are scoped to the package producing the artifact, and that dependency functionality requires an exported wrapper in that package
  • identify the backend-independent C-symbol restriction as a known compiler issue rather than a WebAssembly format restriction
  • identify the native Windows v128.load fallback recursion as a known compiler issue rather than a Windows/SSE2 incompatibility
  • synchronize the Chinese and Japanese catalogs

Why

#export_name was missing from the attributes overview, and the existing FFI text presented it alongside backend link configuration without a clear recommendation. The downstream-package note also did not explain that declarations in a dependency affect the dependency's own artifact but do not propagate into another package's artifact.

The compiler currently applies the same C-compatible export-name check to every backend even though WebAssembly export names are UTF-8 strings. Separately, the Windows exclusion for the v128le example works around recursive C-backend fallback code; presenting either behavior as an inherent platform restriction would be misleading.

Correctness and scope

The documented scope matches package-level linking: the package producing the artifact defines its exports, while dependency declarations remain local to dependency artifacts. The change keeps backend-specific configuration available when export sets or names must differ by backend, and limits the workarounds to the affected compiler behavior.

@peter-jerry-ye
peter-jerry-ye marked this pull request as ready for review July 30, 2026 03:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e06f3e0e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

msgstr ""

#: ../../language/attributes/export_name.md:15
#, fuzzy

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear fuzzy flags from translated export text

In the zh_CN build, this newly translated paragraph will still appear in English because gettext excludes a msgstr marked fuzzy; the same flag remains on the corresponding new export paragraphs in attributes/export_name.po, error_codes/E4219.po, ffi.po, and toolchain/moon/package.po. Clear these flags after verifying the translations so the Chinese text is actually rendered.

AGENTS.md reference: AGENTS.md:L31-L35

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54e587b416

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"反対に `#owned` は、引数が FFI 関数側で保持され、後で `decref` を手動で実行する必要がある意味論です。利用例の 1 "
"つは、クロージャが **owned** になるコールバックの登録です。"

#~ msgid ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove stale duplicate messages from Japanese catalogs

When the Japanese catalogs are compiled with GNU gettext, this obsolete entry has exactly the same msgid as the active entry at line 557, so compilation aborts with a duplicate-message error; the same newly added defect occurs in toolchain/moon/package.po at lines 208 and 2542. Remove both stale obsolete blocks, or deduplicate them through the prescribed i18n synchronization workflow, so standard PO tooling can consume these catalogs.

AGENTS.md reference: AGENTS.md:L24-L27

Useful? React with 👍 / 👎.

@peter-jerry-ye
peter-jerry-ye merged commit 3cfded8 into main Jul 30, 2026
9 checks passed
@peter-jerry-ye
peter-jerry-ye deleted the codex/document-export-name-attribute branch July 30, 2026 10:23
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