Why is the MIME type of the application Rust / x-sharedlib?

I have two Hello World programs written in C ++ and Rust:

main.cpp

#include <iostream>

using namespace std;

int main() {
    cout << "Hello World!" << endl;
}

      

main.rs

fn main() {
    println!("Hello World!");
}

      

I have compiled both of them with the following commands:

g++ main.cpp -o Test.bin

      

and

rustc main.rs -o Test-Rust.bin

      

Checking for the MIME type of the C ++ binary returned the executable as I expected:

$ file --mime-type Test.bin 
Test.bin: application/x-executable

      

But the Rust binary looks like a shared library:

$ file --mime-type Test-Rust.bin 
Test-Rust.bin: application/x-sharedlib

      

Why doesn't the Rust compiler output a simple application, for example g++

?

+3
c ++ mime-types binary rust


source to share


No one has answered this question yet

See similar questions:

0
How do I create an executable with rustc?

or similar:

23498
Why is processing a sorted array faster than processing an unsorted array?
2437
Why "using the std namespace;" considered bad practice?
2116
Why are stigmental additions much faster in individual cycles than in combined cycles?
1783
C ++ 11 introduced a standardized memory model. What does it mean? And how will this affect C ++ programming?
1675
Why is reading lines from stdin much slower in C ++ than Python?
1643
Why templates can only be implemented in a header file?
1483
Why should I use a pointer and not the object itself?
1210
Compiling an application for use in highly radioactive environments
968
What is the correct mime type for docx, pptx, etc.?
7
How do I add Stack Canaries to Rust executables?



All Articles
Loading...
X
Show
Funny
Dev
Pics