Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl WasmTy for u32 and u64 #1808

Merged
merged 2 commits into from
Jun 4, 2020
Merged

impl WasmTy for u32 and u64 #1808

merged 2 commits into from
Jun 4, 2020

Conversation

leoyvens
Copy link
Contributor

@leoyvens leoyvens commented Jun 3, 2020

Wasm integer types are sign agnostic, so if Rust i32 and i64 are WasmTy so should u32 and u64. The trait implentation is exactly the same between i/u32 and i/u64.

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jun 3, 2020
@github-actions
Copy link

github-actions bot commented Jun 3, 2020

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton
Copy link
Member

Agreed these are good to have, thanks!

Some other items I think to take care of are:

  • Could these be written in terms of the i32/i64 impls to cut down on duplication?
  • Can documentation be added to Func::wrap about these types?
  • Can tests be added which exercise the presence of these impls?

@leoyvens
Copy link
Contributor Author

leoyvens commented Jun 3, 2020

@alexcrichton thanks for the review, I've addressed all points.

@alexcrichton
Copy link
Member

Looks great to me! As one final nit, there's a table under "Rust types will map to WebAssembly types as follows", mind adding the u32/u64 types there too?

@leoyvens
Copy link
Contributor Author

leoyvens commented Jun 3, 2020

@alexcrichton ah of course, I missed that. Updated it.

@alexcrichton alexcrichton merged commit cd4a441 into bytecodealliance:master Jun 4, 2020
@alexcrichton
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants