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
Support #![no_std] #133
Comments
I definitely would like to see support for libpnet in the Rust-based OSes - unfortunately it's not as simply as supporting
I'm happy to mentor anyone who wants to start building a network stack with libpnet, or who wants to get it working on their OS. |
that would be pretty awesome ! |
Well, hello there :) We're developping a library operating system in Rust targetting the Xen hypervisor. If everything goes well we're going to be working in a network stack at some point in the January-April period. It's possible that we'll fork |
There's definitely room for improvement in the libpnet API - I've had lots of ideas about changes I want to make, but not had sufficient time to implement them. I've been working on issue #1 recently (one of the biggest remaining limitations in libpnet's current API - that I know of), but haven't finished up my work on that yet. You might be interested in taking a look at my paper about libpnet, it talks a little about some of the design, might be of interest when you come to actually implementing the network stack. Patches and pull requests are always welcome - I look forward to seeing what you come up with. Good luck with your OS! |
Thank you so much for that paper - I'm currently writing up a paper about our progress thus far and our future plans. This is going to be a choice reference :) |
I hope it's useful to you! Let me know if you have any questions, I'd be happy to answer them. It's fairly rough in places, there's definitely a sense of "last minute rush to get it done" at some points. |
As there been any progress/update on that issue? |
None that I'm aware of. As I mentioned earlier in the thread - there's not too much effort involved in getting this working, it just needs someone to do it. I'm happy to mentor this if you're interested. |
I just made a branch and started working on no_std support for this. I'm starting with the following which seem the most straightforward without building a brand new lib to implement kernel stuff. In Scope
The following are out of scope due to the need to have a design conversation about using libc::af_packet and etc and the possible need to implement a rust version libc for linux and something to that affect for windows et. al. in order to enable these. Out of Scope
Reiterating @mrmonday comments above: #133 (comment) Branch: https://github.com/infosechoudini/libpnet/tree/no_std |
Hi, also offering to contribute my implementation of no_std for pnet. |
FYI there's dunmatt/no-std-net#16 and the repository owner is completely off the radar for the entire 2023. Maybe consider using a maintained crate for no_std networking. |
Thanks @bnoctis, |
|
A lot of people are writing operating systems kernels in Rust, and they'll be looking for a network stack.
pnet
could be a choice option.Some thoughts:
nom
implements this as a feature on their package. Compiling with thecore
feature means that#![no_std]
compilation is supported.core
,alloc
, andcollections
.libc
is not going to go well. AFAIK It's pretty much an interface toglibc
, which I wouldn't expect anyone to port to their OS.The text was updated successfully, but these errors were encountered: