Rust not compiling to executable in Linux

Rust not compiling to executable in Linux

Compiling rust on Linux with rustc or cargo build produces a shared library instead of an executable file.

Compiling rust on Linux with rustc or cargo build produces a shared library instead of an executable file.

My file manager (thunar) and file command show that file type as shared library.

And the compiled binary can only be executed via terminal by $ /path/to/file or $ cargo run.

That file cannot be executed just by double clicking as other executables can be.

Output from file command:

$ file rust_bin

rust_bin: ELF 64-bit LSB shared object, x86_64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=cb8cd... , with debug_info, not stripped`


linux rust

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire Dedicated Linux Developer

Looking to develop real-time applications? **[Hire Dedicated Linux Developer](https://hourlydeveloper.io/hire-dedicated-linux-developer/ "Hire Dedicated Linux Developer")** from **[HourlyDeveloper.io](https://hourlydeveloper.io/...

User Administration in Linux - Linux Tutorial - Linux Training

User Administration in Linux - Linux Tutorial - Linux Training

Package Management in Linux - Linux Tutorial - Linux Training

Package Management in Linux - Linux Tutorial - Linux Training

How to install Rust on Ubuntu Linux

Today we'll learn how to install Rust on Ubuntu Linux. The Rust programming language, more commonly known as rust-lang, is a powerful general-purpose

Configure DNS over TLS on Linux Mint to Protect DNS Privacy

Configure DNS over TLS on Linux Mint to Protect DNS Privacy - This tutorial will be showing you how to protect your DNS privacy on Linux Mint with DNS over TLS. We will use a tool called stubby, but first, let me tell you why DNS is not secure.