Wifi-menu like with Rust

Hello everyone! I want to learn Rust and I've been thinking of using it to build Linux utilities. One app that comes to my mind is to build a wifi-menu utility with Rust. Another app could be a file transfer via LAN.

It can be done with Rust? Do I need to communicate with Linux drivers? Where do I start? What tutorials should I do?

As you can see from the post, I don't have knowledge about what can be achieved with Rust, the only think I know is that you can do low level things.

Thank you

Sure! They can certainly be done. For a wifi menu, you should figure out what wifi tools you have on your computer, and figure out what kind api they expose. You might need FFI, or you might need to execute commands from your executable.

As for LAN file transfer, well it should certainly be possible. Open a tcp connection and send some bytes. IPv6 has some cool multicast things you can use to allow devices to discover each other.

1 Like

But how do you recommend to start? Finish the guide on rust-lang.org?

So, use Rust to communicate with the tools that unix has and use them to make my programs?

Well for one the guide is good. As for starting, we'll you have to figure out what you want to build more exactly. GUI is unfortunately very difficult in Rust at this time, so if you're new, I recommend drawing characters in the terminal to make the user interface.

1 Like

I was thinking of using a TUI creator like GitHub - fdehau/tui-rs: Build terminal user interfaces and dashboards using Rust or something similar

For writing GUIs in Rust there is a nice website that tries to accumulate all the available resources to build one:
https://areweguiyet.com/

In general I would recommend to view the problem as two separate ones:
writing a GUI and
writing a tool that can control WiFi (or Ethernet) settings.

So maybe you should start with the latter.
You could try to find some existing libraries that interface with WiFi stuff on crates.io:
Search results for 'wifi'

You can take a look at their source code and figure out what they are doing.
They write something on your own and later implement a GUI for your software.

I hope this helps.

1 Like

You can use https://github.com/heim-rs/heim for the purpose.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.