Skip to content
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

Panic when with target wasm32-wasi #15

Closed
sonhal opened this issue Apr 25, 2021 · 4 comments
Closed

Panic when with target wasm32-wasi #15

sonhal opened this issue Apr 25, 2021 · 4 comments

Comments

@sonhal
Copy link

sonhal commented Apr 25, 2021

Hi i am using the https://github.com/jedisct1/rust-jwt-simple library for my Envoy wasm filter. I am using wasm32-wasi as a target. Seems like this library panics when getting the current time with:

[source/extensions/common/wasm/context.cc:1180] wasm log: panicked at 'Clock not available: Error { code: 58, name: "NOTSUP", message: "Not supported, or operation not supported on socket." }', /Users/sondre/.cargo/registry/src/github.com-1ecc6299db9ec823/coarsetime-0.1.18/src/instant.rs:164:67

Are you aware of this issue with the wasm32-wasi target?

@sonhal
Copy link
Author

sonhal commented Apr 25, 2021

Checked, and it works with CLOCKID_REALTIME, since the tokens usually are received from over the network, is it really necessary with a monotonic clock?

@jedisct1
Copy link
Owner

Looks like this is something that the runtime doesn't implement.

What WebAssembly runtime is it?

@sonhal
Copy link
Author

sonhal commented Apr 28, 2021

Sorry @jedisct1, it was indeed the runtime: proxy-wasm/proxy-wasm-rust-sdk#103

@sonhal sonhal closed this as completed Apr 28, 2021
@sonhal
Copy link
Author

sonhal commented Apr 28, 2021

Your a god damn champ @jedisct1 🎉 I think you just saved a big part of my thesis work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants