-
Notifications
You must be signed in to change notification settings - Fork 715
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
add HermitOS support to branch v0.8.x #1775
base: v0.8.x
Are you sure you want to change the base?
Conversation
HermitOS is a library operating system. It it is partly compatible to Unix. Consequently, the system interface to unix is revised to support HermitOS.
also the master branch disable these warnings
Hm, I think that the my changes aren't the reason for the clippy warnings |
You can ignore the Clippy warnings. |
@@ -48,6 +48,9 @@ log = { version = "0.4.8", optional = true } | |||
[target.'cfg(unix)'.dependencies] | |||
libc = "0.2.149" | |||
|
|||
[target.'cfg(target_os = "hermit")'.dependencies] | |||
libc = { package = "hermit-abi", version = "0.3.9" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we're using hermit-abi
as libc
? That's rather misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised I accept it on master, that was a mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rename it to hermit_abi
. Should we also rename src/sys/unix
to src/sys/hermit
because the prefix libc
is often used in this directory. But the code is more or less identical. Also in other parts of the prefix is often used and code is identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I have an idea to solve it. I will revise it.
@@ -81,6 +84,7 @@ targets = [ | |||
"x86_64-unknown-linux-gnu", | |||
"x86_64-unknown-netbsd", | |||
"x86_64-unknown-openbsd", | |||
"x86_64-unknown-hermit", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this to the CI and the Makefile as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will do it.
@@ -48,6 +48,9 @@ log = { version = "0.4.8", optional = true } | |||
[target.'cfg(unix)'.dependencies] | |||
libc = "0.2.149" | |||
|
|||
[target.'cfg(target_os = "hermit")'.dependencies] | |||
libc = { package = "hermit-abi", version = "0.3.9" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised I accept it on master, that was a mistake.
Co-authored-by: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Co-authored-by: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
I made some changes to the |
Co-authored-by: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Looks good for me. By the way, we try to move parts of ABI to libc (see rust-lang/libc#3724). At least the stabilized interfaced should be moved to libc. |
Backport of #1759
HermitOS is a library operating system. The handling of the socket streams is compatible to unix. However, other parts are not compatible to Unix. Consequently, HermitOS doesn't belong to the unix family.
To support MIO, MIO's unix is revised to support HermitOS. Currently, the implementation based on the unix system poll.