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

add support of HermitOS #1759

Merged
merged 9 commits into from Mar 4, 2024
Merged

add support of HermitOS #1759

merged 9 commits into from Mar 4, 2024

Conversation

stlankes
Copy link
Contributor

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.

HermitOS is a library operating system. It it is partly compatible
to Unix. Consequently, the system interface to unix is revised
to support HermitOS.
@stlankes
Copy link
Contributor Author

We have also version, which based on the branch v0.8.x. Are you interested to integrate HermitOS in the version 0.8?

Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not the biggest fan of dependency. Any chance we can do this with just the libc crate?

@Thomasdezeeuw
Copy link
Collaborator

We have also version, which based on the branch v0.8.x. Are you interested to integrate HermitOS in the version 0.8?

We can backport later.

@stlankes
Copy link
Contributor Author

Yes, I can understand that dependencies are critical. Our OS is written completely in Rust and a classical C library is missing. hermit-abi is also part of std. Do you think that you can support hermit-abi?

By the way, we used a revised version of your examples in our CI.

src/sys/mod.rs Outdated Show resolved Hide resolved
src/sys/unix/mod.rs Outdated Show resolved Hide resolved
src/sys/unix/mod.rs Outdated Show resolved Hide resolved
@Thomasdezeeuw
Copy link
Collaborator

Yes, I can understand that dependencies are critical. Our OS is written completely in Rust and a classical C library is missing. hermit-abi is also part of std. Do you think that you can support hermit-abi?

It was pointed out to me that Hermit does support the libc crate, e.g. rust-lang/libc#3348. If that's the case we're not accepting hermit-abi as dependency.

@mkroening
Copy link

Yes, I can understand that dependencies are critical. Our OS is written completely in Rust and a classical C library is missing. hermit-abi is also part of std. Do you think that you can support hermit-abi?

It was pointed out to me that Hermit does support the libc crate, e.g. rust-lang/libc#3348. If that's the case we're not accepting hermit-abi as dependency.

The only code in libc for Hermit are the definitions of C integer types: https://github.com/rust-lang/libc/blob/main/src/hermit/mod.rs

@Thomasdezeeuw
Copy link
Collaborator

After a bit of discussion we decided to accept the dependency and support of HermitOS as experimental. If you can address the three comments I made earlier we can merge this.

@stlankes
Copy link
Contributor Author

Great! The last commit should solve the first comment. For the other comments, we will find a solution. I will do it next week.

@Thomasdezeeuw
Copy link
Collaborator

Thanks for making the changes, I'm traveling right now so I can't properly review this until next week.

@stlankes
Copy link
Contributor Author

The changes aren't finished. I will "ping" you, when I solve everything.

src/sys/unix/mod.rs Outdated Show resolved Hide resolved
- increase the readability
Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Is this ready to merge?

src/net/tcp/stream.rs Show resolved Hide resolved
@stlankes
Copy link
Contributor Author

stlankes commented Mar 4, 2024

I think that the current version is ready to merge

@Thomasdezeeuw Thomasdezeeuw merged commit cc0b4fe into tokio-rs:master Mar 4, 2024
31 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants