Implement both API and GUI?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/rust

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
  • egui

    egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native

    Besides a browser based GUI you have many other options like egui, Iced etc. In this case you can still use HTTP for communication between your programs, but also sockets, and, if the programs run on the same machine, named pipes and shared memory (which is more efficient for sharing big data chunks).

  • serde

    Serialization framework for Rust

    If you're not using shared memory you need to serialize your Rust data with Serde with a suitable format. If you use a browser GUI you probably want to use the JSON format, but otherwise you can choose a more efficient format like MessagePack.

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • iced

    A cross-platform GUI library for Rust, inspired by Elm

    Besides a browser based GUI you have many other options like egui, Iced etc. In this case you can still use HTTP for communication between your programs, but also sockets, and, if the programs run on the same machine, named pipes and shared memory (which is more efficient for sharing big data chunks).

  • actix-web

    Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

    First I would decide if the GUI application should run in the browser or not. If you have a very complex UI, that's probably the best idea and in that case you want to use HTTP for communication between the programs. You can then either write your GUI code in JavaScript (or a language that compiles to JavaScript) or in Rust which you compile to WASM. In either case you can pick and choose any JS framework you like. The other program should be a HTTP server built using Actix, Axum etc.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts