extism / go-sdk

Extism Go SDK - easily run WebAssembly modules in your Go applications
https://pkg.go.dev/github.com/extism/go-sdk
BSD 3-Clause "New" or "Revised" License
85 stars 10 forks source link

feat: move extism functions to `extism:host/env` namespace #31

Closed mhmd-azeez closed 1 year ago

mhmd-azeez commented 1 year ago

This part of the extism/extism/issues/504 effort to move extism functions to extism::env. For backward compatibility reasons, I am also registering the functions in the env namespace.

nilslice commented 1 year ago

For backward compatibility reasons, I am also registering the functions in the env namespace.

Is this a consistent change we're making across all the SDK options? I'm not certain we should really do this for compatibility alone. The v1.0 rollout gives us a rare opportunity to make incompatible changes, and we should take advantage of that to provide the cleanest implementation and API.

Remember, we will need to support these APIs in v1.X.X for a long time, and if we're duplicating function exposure into multiple namespaces here it sounds like its adding some complexity that could bite us in the future.

@zshipko / @bhelx, would like your thoughts on this too!

mhmd-azeez commented 1 year ago

I'm not certain we should really do this for compatibility alone

The reason I added this because I wanted people to still be able to try out Extism while we're rolling out the change across different SDKs/PDKs. We can remove the shims before release 1.0

nilslice commented 1 year ago

The reason I added this because I wanted people to still be able to try out Extism while we're rolling out the change across different SDKs/PDKs. We can remove the shims before release 1.0

@mhmd-azeez ah that makes sense! ok, let's capture the removal of these on env in a ticket then and make sure we pull them before 1.0. Good thinking -- nice to be able to merge in 1.0 changes while not breaking pre-1.0 code :+1: