2023-04-26
7274
#react#rust
Ahmad Rosid
150928
107
Apr 26, 2023 ⋅ 25 min read

Build a real-time chat app with Rust and React

Ahmad Rosid Software Developer based in Indonesia. Loves solving problems with technology and sharing it with the world.

Recent posts:

Comparing Mutative Vs Immer Vs Reducers For Data Handling In React

Comparing React state tools: Mutative vs. Immer vs. reducers

Mutative processes data with better performance than both Immer and native reducers. Let’s compare these data handling options in React.

Rashedul Alam
Apr 26, 2024 ⋅ 7 min read
Radix Ui Adoption Guide Overview Examples And Alternatives

Radix UI adoption guide: Overview, examples, and alternatives

Radix UI is quickly rising in popularity and has become an excellent go-to solution for building modern design systems and websites.

Nefe Emadamerho-Atori
Apr 25, 2024 ⋅ 11 min read
Understanding The Css Revert Layer Keyword, Part Of Css Cascade Layers

Understanding the CSS revert-layer keyword

In this article, we’ll explore CSS cascade layers — and, specifically, the revert-layer keyword — to help you refine your styling strategy.

Chimezie Innocent
Apr 24, 2024 ⋅ 6 min read
Exploring Nushell, A Rust Powered, Cross Platform Shell

Exploring Nushell, a Rust-powered, cross-platform shell

Nushell is a modern, performant, extensible shell built with Rust. Explore its pros, cons, and how to install and get started with it.

Oduah Chigozie
Apr 23, 2024 ⋅ 6 min read
View all posts

7 Replies to "Build a real-time chat app with Rust and React"

  1. Hi there, congrats for the excellent article.
    A simple question is how to deploy it? Do I need any specifics on the server side to support rust? Like on Aws? Regards,

  2. Thank you for your kind words! I’m happy to help with your question.

    You can deploy a Rust application as a standalone binary on any server or device that is able to run the binary. This means that you do not necessarily need to have the Rust runtime or any other dependencies installed on the target server or device in order to run your application.

    To deploy a Rust application as a standalone binary, you will need to build your application using the `–release` flag, which will optimize the binary for performance. This will produce a self-contained binary that includes everything necessary to run your application.

    You can then transfer the binary to your target server or device and run it as you would any other executable. This approach allows you to deploy your Rust application to a wide range of environments, including servers, VPSs, and even embedded devices.

    And it is possible to deploy a Rust application using Docker, so you can deploy with kubernetes etc.

    I hope this helps! Let me know if you have any other questions.

  3. I know that those articles are for lead generation, but it would be much more useful if you include in code examples logging to logrocket. Debug info, warnings, errors, log context etc.

  4. I am new to rust so I apologize if this is really obvious how do you start the rust backend? I did some looking and I got mixed answers and figured I’d just ask.

  5. Hello,
    I am stuck with installing diesel…
    This is the error I am getting:
    note: LINK : fatal error LNK1181: cannot open input file ‘sqlite3.lib’

    1. may need to install sqlite3 on your system. ie in ubuntu you can install libsqlite3-dev with apt-get.

    2. i too was stuck.
      had to search for many hours.
      i was working on windows platform.
      so here are the steps:
      1. download Source Code sqlite-amalgamation file
      and unzip in a folder (e.g. c:\anyPath).
      download link https://www.sqlite.org/download.html
      2. download Precompiled Binaries for Windows
      and unzip in the above folder (e.g. c:\anyPath).
      3. press window button and paste “Developer Command Prompt for VS xxx”
      and open that “command shell”
      and go to above folder (e.g. c:\anyPath)
      4. copy paste this command and press enter
      “lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x64”
      5. press window button and paste “system environment variables”
      search and open “environment variables”
      and go to “system variables” tab
      and search for “path” in the list of variables
      edit it (double click).
      6. add your folder (e.g. c:\anyPath) under path list and save.

      restart the command prompt (shell)
      a restart will be best
      and start your diesel_cli setup.

      thanks for @Ahmad Rosid for rust tutorial.

Leave a Reply