-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Topic: Run Rust on Raspberry Pi #37
Comments
|
import socket
import netifaces
def get_ip_addresses():
ip_addresses = []
for interface in netifaces.interfaces():
addresses = netifaces.ifaddresses(interface)
if netifaces.AF_INET in addresses:
for address in addresses[netifaces.AF_INET]:
ip_addresses.append(address['addr'])
return ip_addresses
def listen_udp(port):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('', port))
print(f"Listening for UDP messages on port {port}...")
while True:
data, addr = sock.recvfrom(1024)
print(f"Received message from {addr}: {data.decode()}")
if __name__ == "__main__":
print("IP addresses of the computer:")
for ip in get_ip_addresses():
print(ip)
listen_udp(7000) |
For Rust
https://phoenixnap.com/kb/install-rust-ubuntu https://users.rust-lang.org/t/error-installing-nightly-aarch64-unknown-linux-gnu-toolchain-how-to-install-older-version-of-nightly-aarch64-unknown-linux-gnu/51888/4 |
https://doc.rust-lang.org/cargo/getting-started/installation.html |
I love Rust but don’t have time for it.
On the other hand, I need to create code that turns a Raspberry Pi into a mini-server and input hub.
So, the question that comes to mind is:
How hard is it to run Rust on a Raspberry Pi, and does it make sense?
This could make sense in the context of https://raspberry-hosting.com/en.
Some useful resources:
https://youtu.be/MMzCfzCUNyo
The text was updated successfully, but these errors were encountered: