-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Ability to use yaegi's unsafe.Symbols
#11588
New issue
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
Ability to use yaegi's unsafe.Symbols
#11588
Comments
Thanks, @nmengin! |
@nmengin after investigating the wasm middleware, It seems like yaegi would be a better experience. For example, the request context is preserved for yaegi, but in wasm the With wasm, I'm also worried about the need to override the default transport to make http requests. I need to due further testing, but here https://pkg.go.dev/github.com/stealthrocket/net/http I'm seeing that:
Which makes it seem that my dependencies which make http requests will need to be wasip-aware. I'm wondering if you're against adding the ability to use |
I went ahead and opened a PR to show a way this could easily be done: #11589. |
I'm reopening this issue that was closed by mistake. I'm also updating the description with the @rtribotte #11589 (comment) that describes the procedure to follow. |
Welcome!
What did you expect to see?
I expected to be able to use certain go dependencies in my middleware plugin.
Proposal
Create some way to configure traefik to run yaegi's
i.Use(unsafe.Symbols)
. I'm happy to create a PR for this, but I'm unsure of the proper way to add this config item to traefik.Why
I'm trying to build a middleware plugin which has quite a few go dependencies. One of these deeply nested dependencies is
unsafe
. I see here that this part of the standard library can be used. But looking in traefik (here) it looks like it's not being used whatsoever. I'm wondering if there's a clean way to add a yaegi config item to traefik for allowing the use ofunsafe.Symbols
in yaegi. Maybe through the static config of the middleware?[EDIT]
Here's the @rtribotte #11589 (comment) that describes the procedure to follow.
The text was updated successfully, but these errors were encountered: