You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we were afraid to include the ffi utility in the legacy php project.
We've been thinking about this recently, particularly because FFI can be a bit daunting and doesn't work in all environments.
One approach we are actively investigating is leaning further into WASM for the evaluation logic. Then using WASM runtimes in each of the languages that support it (Go is one) to call the evaluation functions.
Currently though, because WASM / WASI spec is not complete, and definitely not supported everywhere, we will have still perform the HTTP requests in the native language like we do in flipt-client-browser and then pass the data to the wasm engine as JSON.
I think we could leverage some of what was done in #326 (Go) to fetch the state like we do in flipt-client-browser but instead of re-implementing the evaluation logic in pure Go we could call into our WASM engine (after adding WASM runtime in Go also).
This would make the Go SDK cross-platform and we could then expand to other languages as well.
This issue tracks the progress/TODOs for trying this in Go first as we know Go the best internally.
TODO
Refactor evaluation lib to remove any HTTP bits (maybe continue on with main...rust)
Build a native WASM engine (no wasmbindgen as it only works for JS)
Create a version of the Go SDK that pulls in a WASM runtime to call into the wasm eval function
There have been several issues with using FFI to call from host languages into the FFI engine.
See:
Ex:
We've been thinking about this recently, particularly because FFI can be a bit daunting and doesn't work in all environments.
One approach we are actively investigating is leaning further into WASM for the evaluation logic. Then using WASM runtimes in each of the languages that support it (Go is one) to call the evaluation functions.
Currently though, because WASM / WASI spec is not complete, and definitely not supported everywhere, we will have still perform the HTTP requests in the native language like we do in flipt-client-browser and then pass the data to the wasm engine as JSON.
I think we could leverage some of what was done in #326 (Go) to fetch the state like we do in
flipt-client-browser
but instead of re-implementing the evaluation logic in pure Go we could call into our WASM engine (after adding WASM runtime in Go also).This would make the Go SDK cross-platform and we could then expand to other languages as well.
This issue tracks the progress/TODOs for trying this in Go first as we know Go the best internally.
TODO
From SyncLinear.com | FLI-1159
The text was updated successfully, but these errors were encountered: