Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[x/programs] Remove
SmartPtr
andHostPtr
#872[x/programs] Remove
SmartPtr
andHostPtr
#872Changes from all commits
25fba69
ece7f6e
b01177f
795ff58
a8a4f26
f035e13
2e1cdb4
942dbac
71c4a34
1c2d161
e7adafb
315d9df
2194f8c
71ec384
21f1778
9d917bf
b6a426c
11a9563
49532bf
440022a
c97bb64
2f0063d
aebc12a
285db8c
f7ef944
3cbba41
a26bb42
7e90e81
cf8ebd4
2255f8c
a4ebe37
dc02edc
0174a25
0ca123b
eac0dc8
8ce44c9
9dd246b
3d76154
0f9494b
8f570b8
e34eb7c
aff83f6
4490172
82cbdf7
cd30bf4
1d63869
49034b8
87a6416
89905d4
1d4d26e
a12d9ae
c5516bd
e8764d3
24bcb84
d601a49
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of casting all of these, I think you can just make them
uint32
to begin with, can't you?Don't worry about it for this PR, but see if you can avoid casting when tackle the rest of #862
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that it's something that works in WASM, the only supported primitive types are
i32
,i64
,f32
,f64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting the following error: "function types incompatible: expected func of type
(i32, i32, i32, i32, i32, i32, i64) -> (i64)
, found func of type(externref, externref, externref, externref, externref, externref, i64) -> (i64)
"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's super weird. When using
wasmtime
directly in Rust, the only part of the type check that matters is the size. I just tried it out on thepublic_functions.rs
code, and I swapped theallocate
type signature to useu32
instead ofi32
, and it worked exactly as expected without changing the actual wasm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I just swapped the function parameters of the
call_program
linked function, I don't think that there is anything else to do ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is why you can't use
uint32
... wasmtime-go doesn't support it. Casting should be fine in that case