Skip to content

[docs] Document missing embind features in the embind guide - #28516

Open
juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:docs_embind_missing_features
Open

juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:docs_embind_missing_features

Conversation

@juj

@juj juj commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Add documentation to embind.rst for features that were previously undocumented in the guide:

  • isDeleted(), isAliasOf() and deleteLater() handle methods, along with setDelayFunction()/flushPendingDeletes().
  • class_::iterable for making bound classes iterable in JavaScript.
  • The emscripten::async() policy for JSPI, linking to the existing Asyncify/JSPI Embind section.
  • Omitting trailing std::optional arguments and std::optional value_object fields.
  • std::u16string and std::u32string in the built-in type table.

Also fix the std::wstring table entry: wchar_t is 4 bytes on Emscripten, so std::wstring is marshalled as UTF-32, not UTF-16.

Add documentation to embind.rst for features that were previously
undocumented in the guide:

- isDeleted(), isAliasOf() and deleteLater() handle methods, along with
  setDelayFunction()/flushPendingDeletes().
- class_::iterable for making bound classes iterable in JavaScript.
- The emscripten::async() policy for JSPI, linking to the existing
  Asyncify/JSPI Embind section.
- Omitting trailing std::optional arguments and std::optional
  value_object fields.
- std::u16string and std::u32string in the built-in type table.

Also fix the std::wstring table entry: wchar_t is 4 bytes on Emscripten,
so std::wstring is marshalled as UTF-32, not UTF-16.
@juj
juj requested a review from brendandahl as a code owner December 2, 2026 00:43

This branch has not been deployed

No deployments
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