We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There doesn't seem to be an option right now to force parameters to be passed inline
For record, list<T, N>, tuple, flags, etc., they are all transfer forms of ptr + len.
record
list<T, N>
tuple
flags
This requires at least
or need
realloc
Is it possible to add an inline-passing option to omit these requirements?
inline-passing
I find this useful in languages where tuples exist.
The text was updated successfully, but these errors were encountered:
Can you clarify what you mean by "passed inline"? For example a record is already "splatted" to its parts and passed inline when it's a parameter:
$ cat foo.wit package a:b; world foo { record x { a: u32, b: f32, c: f64, } import foo: func(x: x); } $ wasm-tools component embed --dummy foo.wit -t (module (type (;0;) (func (param i32 f32 f64))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (import "$root" "foo" (func (;0;) (type 0))) (func (;1;) (type 1) (param i32 i32 i32 i32) (result i32) unreachable ) (memory (;0;) 0) (export "memory" (memory 0)) (export "cabi_realloc" (func 1)) )
(note the parameters to import "$root" "foo")
import "$root" "foo"
Lists which dynamically have a small length are not passed inline, but I'm not sure how that would be managed otherwise.
This is all a result of flattening in the canonical ABI.
So given that, can you clarify what you mean by things should be passed inline?
Sorry, something went wrong.
Perhaps #385 solves a similar problem. At least it does with one specific definition of "inline" and "embed" (into structures).
No branches or pull requests
There doesn't seem to be an option right now to force parameters to be passed inline
For
record
,list<T, N>
,tuple
,flags
, etc., they are all transfer forms of ptr + len.This requires at least
or need
realloc
is required to ensure compliance with the language-defined layoutIs it possible to add an
inline-passing
option to omit these requirements?I find this useful in languages where tuples exist.
The text was updated successfully, but these errors were encountered: