Can I write ethernet driver in Rust? Will it get accepted later on?

Just curious what if I write ethernet drivers in Rust?

I expect that sooner or later OpenWrt will start building Rust kernel code, since Rust is no longer marked experimental in the Linux kernel.
You may need to target mainline Linux first and get your code in via net-next etc. (which it turn would depend on your development target having at least near mainline support already).

I don't know how much work has been done already to pave the way for Rust development of entire Ethernet drivers. The only rust files under linux/drivers/net are two PHY drivers (Applied Micro QT2025 and Asix AX887xx - although the AX887xx driver already has a C driver too).

But afaik Rust isn't there yet for very deep ethernet driver things.

Back in the day I wrote a zillion Ethernet drivers in C and I don't see why they couldn't be done in Rust as long as there's a way to align buffers and perform PIO with bit-packed data structures.

It might be worth asking on the rust-for-linux kernel mailing list. There is a bit of a chicken-and-egg problem in that the kernel doesn't usually accept unused code (e.g. rust bindings which lack a user). If you have an unsupported card, then having the first Rust Ethernet driver in mainline Linux sounds like an interesting thing to attempt, you may be able to get quite a lot of useful assistance from the Rust for Linux team, and you may also find that others have been working on the necessary bindings, but they lack a viable real-world user. Things like Ethernet drivers in Rust seem like a good next step for Linux (and the presence of phy drivers paves the way somewhat in that it wouldn't be the first Rust code in the net tree). If you haven't already seen it, then this recent (May 2026) talk by GregKH might include some useful references, but more generally provide info about the kernel teams general disposition when it comes to Rust drivers: https://www.youtube.com/watch?v=Nzmj7K0FNRY
What's the hardware you're thinking of targetting?