this post was submitted on 08 Sep 2024
38 points (95.2% liked)
Programming
17476 readers
172 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
@leisesprecher It depends on how much you're willing to optimise/go low level.
Rust is very fast and doesn't use much memory. You can use some frameworks like Axum, Rocket (very well documented) and Actix, but they're all high throughout beasts, so there the possibility of them using a bit of memory, like 40MB.
C++ can be high level and very efficient, using very little space. However, it is very very easy to shoot yourself in the foot, and is going to cost you in debugging time.
+
@leisesprecher
Python is very straightforward and doesn't use much memory in general< 60MB. However, it depends greatly on the framework (same as other languages!), but for a simple REST service, FastAPI is a star. It models endpoints as functions. I don't recommend using it for anything production though. There is also Flask, but I haven't used it enough.