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:

TypeScript logo over a pink and white background.

Drizzle vs. Prisma: Which ORM is best for your project?

Compare Prisma and Drizzle ORMs to learn their differences, strengths, and weaknesses for data access and migrations.

Temitope Oyedele
Nov 21, 2024 ⋅ 10 min read
Practical Implementation Of The Rule Of Least Power For Developers

Practical implementation of the Rule of Least Power for developers

It’s easy for devs to default to JavaScript to fix every problem. Let’s use the RoLP to find simpler alternatives with HTML and CSS.

Timonwa Akintokun
Nov 21, 2024 ⋅ 8 min read
Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 ⋅ 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 ⋅ 13 min read
View all posts

8 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.

  6. How to run this on windows 11 i try but “LINK : fatal error LNK1181: cannot open input file ‘sqlite3.lib'”
    This error comes always i don’t know how to correct this i also try to correct

Leave a Reply