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

WasmEdge broke ABI of sock_getlocaladdr and sock_getpeeraddr #81

Open
achille-roussel opened this issue Feb 12, 2023 · 4 comments
Open

Comments

@achille-roussel
Copy link

Hello!

I was working this this library and I noticed that the changes from WasmEdge/WasmEdge#1599 have changed the signatures of socket_getlocaladdr and sock_getpeeraddr. As far as I can tell, all programs built with wasmedge_wasi_socket (or other that were ABI compatible) won't be able to run anymore if they depended on the socket extensions.

Ideally the runtime should not break ABIs, but since this seems to have been merged already, would it make sense to update this client library so programs that use it can run on WasmEdge and benefit from the socket extensions again?

For example, these functions would need to be updated so their signatures match what the runtime expects?
https://github.com/second-state/wasmedge_wasi_socket/blob/main/src/socket.rs#L323-L334

@hydai
Copy link
Member

hydai commented Feb 12, 2023

We will have other breaking changes in the WasmEdge 0.12 release, e.g. sync up the spec with the WASI socket spec at the same time. So this and the related libraries will be updated once the ABI is fixed. There will be a new version for this.

@juntao
Copy link
Member

juntao commented Feb 12, 2023

Hi @achille-roussel

The WasmEdge WASI socket aims to support more features over time (eg DNS, Domain sockets, TLS). So, we can only guarantee compatibility with specific WasmEdge release versions. For example, the wasmedge_wasi_socket 0.4.x are compatible with WasmEdge 0.11.x.

If you can tell us more about your specific use cases, we will be able to give more specific suggestions on how to stay compatible. Thanks!

@achille-roussel
Copy link
Author

Would it be possible for WasmEdge to introduce these extensions in a backward-compatible manner? For example, having sock_getpeeraddr then sock_getpeeraddr2 similarly to how the Linux kernel introduces new versions of syscalls?

As a user, it is difficult to keep up with these types of changes because they may appear late in the development process (e.g. if the wasmedge version in a production environment happens not to be the same as the one used during tests).

@juntao
Copy link
Member

juntao commented Feb 12, 2023

It is certainly the way to do it once we reach a stable 1.0 release.

Our current priority is to reach feature parity with Linux sockets. At the same time, we also need to accommodate changes in the draft WASI socket spec so that we can stay compatible with other Wasm runtimes. So things might change from release to release.

Is it possible for you to lock down the wasmedge_wasi_socket version and WasmEdge runtime version for your project so that they do not break when we release new features? Thanks!

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

3 participants