Skip to content

Add a Type::String variant#202

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
alexcrichton:new-string-type
Apr 21, 2022
Merged

Add a Type::String variant#202
alexcrichton merged 2 commits intobytecodealliance:mainfrom
alexcrichton:new-string-type

Conversation

@alexcrichton
Copy link
Member

This removes the implicit interpretation that list<char> is equivalent
to string, enabling list<char> to be equivalent to &[char] in
Rust, for example. This commit is plumbed throughout all generators with
new pseudo-instructions for lifting/lowering strings.

This removes the implicit interpretation that `list<char>` is equivalent
to `string`, enabling `list<char>` to be equivalent to `&[char]` in
Rust, for example. This commit is plumbed throughout all generators with
new pseudo-instructions for lifting/lowering strings.
@alexcrichton alexcrichton mentioned this pull request Apr 20, 2022
21 tasks
Copy link
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

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

👍 Just some minor comment nits that can be ignored if you want.

Co-authored-by: Peter Huene <peter@huene.dev>
@alexcrichton alexcrichton merged commit 6d78047 into bytecodealliance:main Apr 21, 2022
@alexcrichton alexcrichton deleted the new-string-type branch April 21, 2022 14:38
willemneal pushed a commit to theahaco/wit-bindgen that referenced this pull request May 31, 2022
* Add a `Type::String` variant

This removes the implicit interpretation that `list<char>` is equivalent
to `string`, enabling `list<char>` to be equivalent to `&[char]` in
Rust, for example. This commit is plumbed throughout all generators with
new pseudo-instructions for lifting/lowering strings.

* Apply suggestions from code review

Co-authored-by: Peter Huene <peter@huene.dev>

Co-authored-by: Peter Huene <peter@huene.dev>
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