Skip to content

[C/JS API] Add string reference types#4810

Merged
kripken merged 5 commits into
WebAssembly:mainfrom
dcodeIO:c-js-strings
Jul 27, 2022
Merged

[C/JS API] Add string reference types#4810
kripken merged 5 commits into
WebAssembly:mainfrom
dcodeIO:c-js-strings

Conversation

@dcodeIO

@dcodeIO dcodeIO commented Jul 16, 2022

Copy link
Copy Markdown
Contributor

Adds the stringref, stringview_wtf8, stringview_wtf16 and stringview_iter reference types to the C and JS APIs.

Comment thread test/example/c-api-kitchen-sink.c Outdated
BinaryenTypeExpand(stringref, &valueType);
assert(valueType == stringref);

BinaryenType stringview_wtf8_ = BinaryenTypeStringviewWtf8();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note: The _ is there to substitute ref so these don't conflict with the heap types of the same name that another PR adds tests for below.

@dcodeIO dcodeIO marked this pull request as ready for review July 21, 2022 08:28
Comment thread src/binaryen-c.h Outdated
@kripken kripken merged commit 0cd9fb5 into WebAssembly:main Jul 27, 2022
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