deislabs / wagi

Write HTTP handlers in WebAssembly with a minimal amount of work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encapsulate the router info that is passed to the module.

technosophos opened this issue · comments

Right now, the Router has some configuration info that gets passed to the Module in the form of long parameter lists on functions. We should probably encapsulate that information in some way.

Example: https://github.com/deislabs/wagi/blob/main/src/runtime/mod.rs#L137

I can try my hand here if no-one else is working on it - is the ask to encapsulate the params being passed to execute() here,

https://github.com/deislabs/wagi/blob/main/src/runtime/mod.rs#L145-L156

Yeah. Refactoring that into a struct or something would likely result in cleaner code.

Sure simple enough (in theory). I will give it a shot!