-
Notifications
You must be signed in to change notification settings - Fork 232
Add AF_VSOCK based SocketAddr #1558
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
Open
notgull
wants to merge
1
commit into
bytecodealliance:main
Choose a base branch
from
forkgull:notgull/vsock
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+459
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
06b35ea to
8e05dca
Compare
366e85c to
536f911
Compare
notgull
added a commit
to forkgull/vsock-rs
that referenced
this pull request
Dec 23, 2025
vsock-rs currently uses a mix of nix and libc to handle the underlying system calls. However, in addition to adding a few extra dependencies, this means that there is a significant amount of unneeded unsafe code in the project. By porting to "rustix", we gain the following advantages: - Most of the code in the project can be rewritten completely safely. - We avoid going through libc. In other projects this has been benchmarked to lead to a 2.5% performance increase. - On Linux, we reduce the number of dependencies the project pulls in. On other platforms, it stays the same. Blocked on bytecodealliance/rustix#1558 Signed-off-by: John Nunley <[email protected]>
d1b97ab to
8b0c58b
Compare
This is necessary in order to connect to AF_VSOCK sockets, or listen on the AF_VSOCK socket type. Signed-off-by: John Nunley <[email protected]>
8b0c58b to
12985d4
Compare
Contributor
Author
|
No, I don't know why this |
notgull
added a commit
to forkgull/vsock-rs
that referenced
this pull request
Dec 24, 2025
vsock-rs currently uses a mix of nix and libc to handle the underlying system calls. However, in addition to adding a few extra dependencies, this means that there is a significant amount of unneeded unsafe code in the project. By porting to "rustix", we gain the following advantages: - Most of the code in the project can be rewritten completely safely. - We avoid going through libc. In other projects this has been benchmarked to lead to a 2.5% performance increase. - On Linux, we reduce the number of dependencies the project pulls in. On other platforms, it stays the same. Blocked on bytecodealliance/rustix#1558 Signed-off-by: John Nunley <[email protected]>
notgull
added a commit
to forkgull/vsock-rs
that referenced
this pull request
Dec 24, 2025
vsock-rs currently uses a mix of nix and libc to handle the underlying system calls. However, in addition to adding a few extra dependencies, this means that there is a significant amount of unneeded unsafe code in the project. By porting to "rustix", we gain the following advantages: - Most of the code in the project can be rewritten completely safely. - We avoid going through libc. In other projects this has been benchmarked to lead to a 2.5% performance increase. - On Linux, we reduce the number of dependencies the project pulls in. On other platforms, it stays the same. Blocked on bytecodealliance/rustix#1558 Signed-off-by: John Nunley <[email protected]>
Contributor
Author
|
@sunfishcode When you have time, can you take a look at this one? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is necessary in order to connect to AF_VSOCK sockets, or listen
on the AF_VSOCK socket type.
Dependent on sunfishcode/linux-raw-sys#177