alexcrichton opened PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
sunfishcode submitted PR Review.
sunfishcode submitted PR Review.
sunfishcode created PR Review Comment:
Can this use
.addinstead of.offsetwith a cast?
sunfishcode created PR Review Comment:
While we're here, instead of casting to
*mut u8, could we change the signature ofwasmtime_call_trampolineto expect a*mut u128? And maybe we can also renamewasmtime_call_trampolineto justcall_trampoline, since we're qualifiying it with the crate name here anyway.
sunfishcode created PR Review Comment:
We use
u128for values in a lot of places, Is there a reason to preferi128here?Random idea, don't feel obliged to do this here, but we could also introduce a new type, like
VMValueor so, which has the size and alignment of au128, that we could use instead ofu128everywhere, to help document the intent.
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Nah this was just carried over from the original implementation, I'll switch it all to u128
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits to master:
This commit simplifies
Funcand its API through a few avenues:
- The
callablemodule is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callabletrait is removed in favor of just using animpl Fn()argument- The
Func::newmethod is now generic and no longer requires an explicitRcallocation- The
Func::newclosure now takes a leading&Callerargument to empower it with the same capabilities ofFunc::wrap
alexcrichton merged PR #1363.
Last updated: Dec 06 2025 at 06:05 UTC