{"id":299257,"date":"2020-02-25T21:00:17","date_gmt":"2020-02-25T21:00:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299257"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299257","title":{"rendered":"\u041a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 Rust \u0434\u043b\u044f Windows \u0438\u0437 Linux"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/489874\/\">\n<p>\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0436 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0435\u0441\u043b\u0438 \u044f \u0442\u0443\u0442, \u043d\u0430 IT \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0435 \u0425\u0430\u0431\u0440\u0430, \u0441\u043a\u0430\u0436\u0443 \u0447\u0442\u043e \u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u0430\u043b\u0443\u044e \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f OS \u0443 \u043c\u0435\u043d\u044f Linux, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u043b\u044f Windows. \u0418 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 Windows \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 exe \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0421 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 C \u0438 C++ \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442, \u0434\u0430\u0432\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 <code>MinGW<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u041f\u0440\u043e <code>Python<\/code> \u0438 <code>Java<\/code> \u0434\u0430\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0438\u0445 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e. \u041d\u043e \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u043e\u0432\u043e\u043c\u043e\u0434\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043a\u0430\u043a Rust. \u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0433\u043e \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Rust \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 <code>cargo<\/code> \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447 <code>--target<\/code>, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 ABI \u0438 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0437 Linux \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c exe, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f Windows. \u041d\u043e \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">cargo build --target x86_64-pc-windows-gnu<\/code><\/pre>\n<p>  <\/p>\n<p>\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u043b\u0438\u043d\u043a\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">error: linking with `gcc` failed: exit code: 1  [...]    = note: \/usr\/bin\/ld: unrecognized option '--nxcompat'           \/usr\/bin\/ld: use the --help option for usage information           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u044f \u044d\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u043b \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043c\u043e\u0433\u0443 \u043a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Rust \u0434\u043b\u044f Windows, \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u044f Linux, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Disclaimer<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u0438 32bit \u0438 64bit pc-windows-gnu, \u0446\u0435\u043b\u0438 pc-windows-msvc \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043d\u0438\u0445 \u044f \u043d\u0435 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u043b\u0441\u044f. \u0422\u0430\u043a \u0436\u0435 \u0440\u0435\u0447\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043e \u0442\u043e\u043c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435 Linux, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u043c\u043e\u0451\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0442\u043e \u0435\u0441\u0442\u044c Fedora Linux 31, \u043d\u043e \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 Linux \u0431\u0443\u0434\u0443\u0442 \u043e\u0447\u0435\u043d\u044c \u0443\u0436 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f. \u0418 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Rust \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/rustup.rs\/\">The Rust toolchain installer<\/a>, \u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Fedora Rust \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043d\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f nightly \u0441\u0431\u043e\u0440\u043a\u0438 Rust, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435\u0442.<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0446\u0435\u043b\u0438, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">rustup target list<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439, \u0438 \u0446\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">aarch64-apple-ios aarch64-fuchsia [...] i686-pc-windows-gnu (installed) [...] i686-unknown-linux-gnu (installed) [...] x86_64-pc-windows-gnu (installed) x86_64-unknown-linux-gnu (installed) [...]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f Windows \u0438\u0437 Linux \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0446\u0435\u043b\u0438 <code>i686-pc-windows-gnu<\/code> \u0434\u043b\u044f 32bit exe \u0438 <code>x86_64-pc-windows-gnu<\/code> \u0434\u043b\u044f 64bit exe. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u0438 \u043d\u0435 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a <code>(installed)<\/code>, \u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">rustup target add \u0438\u043c\u044f_\u0446\u0435\u043b\u0438<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 <code>MinGW<\/code>, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">rpm -qa | grep mingw<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">mingw32-gcc-9.2.1-1.fc31.x86_64 mingw32-binutils-2.32-6.fc31.x86_64 mingw64-gcc-9.2.1-1.fc31.x86_64 mingw-binutils-generic-2.32-6.fc31.x86_64 mingw-filesystem-base-110-1.fc31.noarch mingw64-winpthreads-6.0.0-2.fc31.noarch mingw32-winpthreads-6.0.0-2.fc31.noarch mingw32-crt-6.0.0-2.fc31.noarch mingw64-binutils-2.32-6.fc31.x86_64 mingw64-crt-6.0.0-2.fc31.noarch mingw64-filesystem-110-1.fc31.noarch mingw32-filesystem-110-1.fc31.noarch mingw32-cpp-9.2.1-1.fc31.x86_64 mingw64-headers-6.0.0-2.fc31.noarch mingw32-headers-6.0.0-2.fc31.noarch mingw64-cpp-9.2.1-1.fc31.x86_64<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 <code>MinGW<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">sudo dnf install mingw32-gcc mingw64-gcc<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0443 \u0432\u043e\u0442 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438, \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u043e \u043c\u0435\u0440\u0435 \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f (\u0430\u0433\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e Test-Driven Development, \ud83d\ude42<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi rust]$ cargo new foobar      Created binary (application) `foobar` package [pfemidi@pfemidi rust]$ cat foobar\/src\/main.rs  fn main() {     println!(&quot;Hello, world!&quot;); } [pfemidi@pfemidi rust]$<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u043a\u0430\u043a \u0440\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Linux:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cargo run    Compiling foobar v0.1.0 (\/home\/pfemidi\/mywork\/rust\/foobar)     Finished dev [unoptimized + debuginfo] target(s) in 1.65s      Running `target\/debug\/foobar` Hello, world! [pfemidi@pfemidi foobar]$ <\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0433\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a \u0446\u0435\u043b\u044c <code>x86_64-pc-windows-gnu<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">cargo build --target x86_64-pc-windows-gnu<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">error: linking with `gcc` failed: exit code: 1  [...]    = note: \/usr\/bin\/ld: unrecognized option '--nxcompat'           \/usr\/bin\/ld: use the --help option for usage information           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043b\u0438\u043d\u043a\u0435\u0440 \u0438\u0437 <code>MinGW<\/code>, \u0430 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <code>gcc<\/code>. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e .cargo \u0438 \u0432 \u043d\u0435\u0439 \u0444\u0430\u0439\u043b config \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ mkdir .cargo [pfemidi@pfemidi foobar]$ cat &gt; .cargo\/config [target.i686-pc-windows-gnu] linker = &quot;i686-w64-mingw32-gcc&quot; ar = &quot;i686-w64-mingw32-ar&quot;  [target.x86_64-pc-windows-gnu] linker = &quot;x86_64-w64-mingw32-gcc&quot; ar = &quot;x86_64-w64-mingw32-ar&quot; [pfemidi@pfemidi foobar]$<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0446\u0435\u043b\u0435\u0439 \u0434\u043b\u044f Windows \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043b\u0438\u043d\u043a\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <code>gcc<\/code>, \u0430 \u043b\u0438\u043d\u043a\u0435\u0440 \u0438\u0437 <code>MinGW<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043d\u043e\u0432\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">cargo build --target x86_64-pc-windows-gnu<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043e\u0442 \u043b\u0438\u043d\u043a\u0435\u0440\u0430, \u0443\u0436\u0435 \u043e\u0442 <code>x86_64-w64-mingw32-gcc<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1  [...]    = note: \/usr\/lib\/gcc\/x86_64-w64-mingw32\/9.2.1\/..\/..\/..\/..\/x86_64-w64-mingw32\/bin\/ld: cannot find -lpthread           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Rust \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0451 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0432\u0438\u0434\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0440\u043e\u043c\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <code>mingw32-winpthreads<\/code> \u0438 <code>mingw64-winpthreads<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <code>dnf<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f <code>mingw32-gcc<\/code> \u0438 <code>mingw64-gcc<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>mingw32-winpthreads-static<\/code> \u0438 <code>mingw64-winpthreads-static<\/code>, \u0431\u0435\u0437 \u043d\u0438\u0445 \u043b\u0438\u043d\u043a\u0435\u0440 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 <code>-lpthread<\/code> \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0451\u0442. \u0414\u043e\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">sudo dnf install mingw??-winpthreads-static<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043e\u043f\u044f\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">cargo build --target x86_64-pc-windows-gnu<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438! \u041d\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1  [...]    = note: \/usr\/lib\/gcc\/x86_64-w64-mingw32\/9.2.1\/..\/..\/..\/..\/x86_64-w64-mingw32\/bin\/ld: \/home\/pfemidi\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/x86_64-pc-windows-gnu\/lib\/crt2.o:crtexe.c:(.rdata$.refptr.__onexitbegin[.refptr.__onexitbegin]+0x0): undefined reference to `__onexitbegin'           \/usr\/lib\/gcc\/x86_64-w64-mingw32\/9.2.1\/..\/..\/..\/..\/x86_64-w64-mingw32\/bin\/ld: \/home\/pfemidi\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/x86_64-pc-windows-gnu\/lib\/crt2.o:crtexe.c:(.rdata$.refptr.__onexitend[.refptr.__onexitend]+0x0): undefined reference to `__onexitend'           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041b\u0438\u043d\u043a\u0435\u0440 \u0436\u0430\u043b\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b <code>__onexitbegin<\/code> \u0438 <code>__onexitend<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 <code>~\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/x86_64-pc-windows-gnu\/lib\/crt2.o<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0446\u0435\u043b\u0438 <code>x86_64-pc-windows-gnu<\/code>. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0434\u0443\u043c\u0438\u0439, \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u043e\u0432 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Rust, \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0441\u0430\u043c\u043e\u0433\u043e Rust, \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0438 \u0447\u0435\u043c \u0441\u0430\u043c Rust \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u044f \u043f\u043e\u043d\u044f\u043b: \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0441\u0430\u043c Rust \u0434\u043b\u044f Windows, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 pc-windows-gnu, \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c MinGW 6.3.0, \u0430 \u0443 \u043c\u0435\u043d\u044f \u0432 Fedora Linux 31 \u0432\u0435\u0440\u0441\u0438\u044f MinGW 9.2.1, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0432 CRT. Ok, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 crt2.o \u0438\u0437 \u0444\u0435\u0434\u043e\u0440\u0438\u043d\u043e\u0433\u043e MinGW \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e Rust \u0434\u043b\u044f \u0446\u0435\u043b\u0438 x86_64-pc-windows-gnu. \u0418 \u043a\u0440\u043e\u043c\u0435 crt2.o \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0451\u043c \u0435\u0449\u0451 \u0438 dllcrt2.o, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cd ~\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/x86_64-pc-windows-gnu\/lib\/ [pfemidi@pfemidi lib]$ cp \/usr\/x86_64-w64-mingw32\/sys-root\/mingw\/lib\/crt2.o . [pfemidi@pfemidi lib]$ cp \/usr\/x86_64-w64-mingw32\/sys-root\/mingw\/lib\/dllcrt2.o . [pfemidi@pfemidi lib]$ cd - \/home\/pfemidi\/mywork\/rust\/foobar [pfemidi@pfemidi foobar]$ <\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043e\u043f\u044f\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Rust:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">pfemidi@pfemidi foobar]$ cargo build --target x86_64-pc-windows-gnu    Compiling foobar v0.1.0 (\/home\/pfemidi\/mywork\/rust\/foobar)     Finished dev [unoptimized + debuginfo] target(s) in 4.46s [pfemidi@pfemidi foobar]$<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e! \u0412\u0441\u0451 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c! \u0422.\u043a. \u0443 \u043c\u0435\u043d\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <a href=\"https:\/\/www.winehq.org\/\">wine<\/a>, \u0442\u043e \u0442\u0443\u0442 \u0436\u0435 \u044f \u043c\u043e\u0433\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cargo run --target x86_64-pc-windows-gnu     Finished dev [unoptimized + debuginfo] target(s) in 0.38s      Running `target\/x86_64-pc-windows-gnu\/debug\/foobar.exe` Hello, world! [pfemidi@pfemidi foobar]$<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0434\u0430\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f 32bit \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Windows, \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0440\u0430\u0437\u0443 <code>run<\/code> \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e <code>build<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">error: linking with `i686-w64-mingw32-gcc` failed: exit code: 1  [...]    = note: \/usr\/lib\/gcc\/i686-w64-mingw32\/9.2.1\/..\/..\/..\/..\/i686-w64-mingw32\/bin\/ld: \/home\/pfemidi\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/crt2.o:crtexe.c:(.text+0x75): undefined reference to `__onexitend'           \/usr\/lib\/gcc\/i686-w64-mingw32\/9.2.1\/..\/..\/..\/..\/i686-w64-mingw32\/bin\/ld: \/home\/pfemidi\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/crt2.o:crtexe.c:(.text+0x7a): undefined reference to `__onexitbegin'           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0443 \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 <code>__onexitbegin<\/code> \u0438 <code>__onexitend<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>~\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/crt2.o<\/code> \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438, \u043b\u0435\u0447\u0438\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0434\u043b\u044f 64bit \u0446\u0435\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432 crt2.o \u0438 dllcrt2.o \u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043f\u043e \u0438\u043c\u0435\u043d\u0430\u043c, \u043d\u043e \u0438\u0437 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 <code>MinGW<\/code> \u0438\u0437 Fedora:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cd ~\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/ [pfemidi@pfemidi lib]$ cp \/usr\/i686-w64-mingw32\/sys-root\/mingw\/lib\/crt2.o . [pfemidi@pfemidi lib]$ cp \/usr\/i686-w64-mingw32\/sys-root\/mingw\/lib\/dllcrt2.o . [pfemidi@pfemidi lib]$ cd - \/home\/pfemidi\/mywork\/rust\/foobar [pfemidi@pfemidi foobar]$ <\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$  [pfemidi@pfemidi foobar]$ cargo run --target i686-pc-windows-gnu    Compiling foobar v0.1.0 (\/home\/pfemidi\/mywork\/rust\/foobar)     Finished dev [unoptimized + debuginfo] target(s) in 5.12s      Running `target\/i686-pc-windows-gnu\/debug\/foobar.exe` Hello, world! [pfemidi@pfemidi foobar]$<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0443\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0436\u0435 \u0432\u0441\u0451 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u043a\u0430 \u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u043d\u0438\u043a\u0443\u044e\u0442 (macro panic!, \u0444\u0443\u043d\u043a\u0446\u0438\u044f expect \u0438 \u0442.\u0434.) \u0432 32bit \u0446\u0435\u043b\u044f\u0445 \u0434\u043b\u044f Windows. \u0412 \u0446\u0435\u043b\u044f\u0445 64bit \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e, \u0430 \u0432\u043e\u0442 \u0432 \u0446\u0435\u043b\u044f\u0445 32bit \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0430\u043d\u0438\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cat src\/main.rs  fn main() {     println!(&quot;Hello, world!&quot;);     panic!(&quot;I'm panicked!&quot;);    \/\/ \u0412\u041e\u0422 \u041d\u0410\u0428\u0410 \u041f\u0410\u041d\u0418\u041a\u0410! } [pfemidi@pfemidi foobar]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f 64bit Windows:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cargo run --target x86_64-pc-windows-gnu    Compiling foobar v0.1.0 (\/home\/pfemidi\/mywork\/rust\/foobar)     Finished dev [unoptimized + debuginfo] target(s) in 2.95s      Running `target\/x86_64-pc-windows-gnu\/debug\/foobar.exe` Hello, world! thread 'main' panicked at 'I'm panicked!', src\/main.rs:3:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. [pfemidi@pfemidi foobar]$<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0438 \u0443\u043a\u0430\u0436\u0435\u043c 32bit Windows.<\/p>\n<p>  <\/p>\n<p>\u0423\u043f\u0441:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cargo run --target i686-pc-windows-gnu    Compiling foobar v0.1.0 (\/home\/pfemidi\/mywork\/rust\/foobar) error: linking with `i686-w64-mingw32-gcc` failed: exit code: 1  [...]    = note: \/usr\/lib\/gcc\/i686-w64-mingw32\/9.2.1\/..\/..\/..\/..\/i686-w64-mingw32\/bin\/ld: \/home\/pfemidi\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/libpanic_unwind-1a1fb2d4d34efaf8.rlib(panic_unwind-1a1fb2d4d34efaf8.panic_unwind.2hbcqjo8-cgu.0.rcgu.o): in function `ZN12panic_unwind3imp5panic17hdaabfe6326236dacE':           \/rustc\/5e1a799842ba6ed4a57e91f7ab9435947482f7d8\\\/src\\libpanic_unwind\/gcc.rs:73: undefined reference to `_Unwind_RaiseException'           \/usr\/lib\/gcc\/i686-w64-mingw32\/9.2.1\/..\/..\/..\/..\/i686-w64-mingw32\/bin\/ld: \/home\/pfemidi\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/libpanic_unwind-1a1fb2d4d34efaf8.rlib(panic_unwind-1a1fb2d4d34efaf8.panic_unwind.2hbcqjo8-cgu.0.rcgu.o): in function `rust_eh_unwind_resume':           \/rustc\/5e1a799842ba6ed4a57e91f7ab9435947482f7d8\\\/src\\libpanic_unwind\/gcc.rs:327: undefined reference to `_Unwind_Resume'           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u043b\u0438\u043d\u043a\u0435\u0440 \u0436\u0430\u043b\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b <code>_Unwind_RaiseException<\/code> \u0438 <code>_Unwind_Resume<\/code> \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <code>libpanic<\/code> \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Rust.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0440\u0430\u0437\u0434\u0443\u043c\u0438\u044f, \u0441\u043d\u043e\u0432\u0430 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u0435, \u0441\u043d\u043e\u0432\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u043e\u0432 \u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0433\u043e Rust, \u0442\u0430\u043a \u0438 \u0435\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0418 \u044f \u043f\u043e\u043d\u044f\u043b \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0442\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u043c\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 Rust \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>Dwarf<\/code> \u0434\u043b\u044f 32bit \u0446\u0435\u043b\u0435\u0439 Windows \u0438 <code>SEH<\/code> \u0434\u043b\u044f 64bit \u0446\u0435\u043b\u0435\u0439 Windows, \u0430 <code>MinGW<\/code> \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f Fedora Linux \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>SJLJ<\/code> \u0434\u043b\u044f 32bit \u0446\u0435\u043b\u0435\u0439 Windows \u0438 <code>SEH<\/code> \u0434\u043b\u044f 64bit \u0446\u0435\u043b\u0435\u0439 Windows (\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/stackoverflow.com\/questions\/15670169\/what-is-difference-between-sjlj-vs-dwarf-vs-seh\">\u0442\u0443\u0442<\/a>). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 64bit \u0446\u0435\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0434\u043b\u044f 32bit \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c <code>MinGW<\/code> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 <code>Dwarf<\/code> \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u043a\u0438 <code>SJLJ<\/code> \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f 32bit \u0446\u0435\u043b\u0435\u0439 Windows.<\/p>\n<p>  <\/p>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c <code>MinGW<\/code>, \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u043d\u0435 \u0442\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e (<code>configure<\/code> \u0442\u0430\u043c \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--disable-sjlj-exceptions<\/code>, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e), \u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e: \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a <code>MinGW<\/code> \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u043d \u0441 \u0440\u0430\u0437\u043c\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0435\u043a\u0430 <code>Dwarf<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>SJLJ<\/code> \u043e\u0442\u0442\u0443\u0434\u0430 \u043d\u0430\u0434\u043e \u0432\u0437\u044f\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>libgcc_eh.a<\/code> \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0446\u0435\u043b\u0438 <code>i686-pc-windows-gnu<\/code>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0430\u043d\u0438\u043a\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0447\u043d\u0443\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f 64bit \u0446\u0435\u043b\u0435\u0439 Windows, \u043d\u043e \u0438 \u0434\u043b\u044f 32bit:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[pfemidi@pfemidi foobar]$ cd ~\/.rustup\/toolchains\/stable-x86_64-unknown-linux-gnu\/lib\/rustlib\/i686-pc-windows-gnu\/lib\/ [pfemidi@pfemidi lib]$ cp ~\/rpmbuild\/BUILD\/gcc-9.2.1-20190827\/build_win32\/i686-w64-mingw32\/libgcc\/libgcc_eh.a . [pfemidi@pfemidi lib]$ cd - \/home\/pfemidi\/mywork\/rust\/foobar [pfemidi@pfemidi foobar]$ cargo run --target i686-pc-windows-gnu    Compiling foobar v0.1.0 (\/home\/pfemidi\/mywork\/rust\/foobar)     Finished dev [unoptimized + debuginfo] target(s) in 4.57s      Running `target\/i686-pc-windows-gnu\/debug\/foobar.exe` Hello, world! thread 'main' panicked at 'I'm panicked!', src\/main.rs:3:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. [pfemidi@pfemidi foobar]$ <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0443 \u0432\u043e\u0442, \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/489874\/\"> https:\/\/habr.com\/ru\/post\/489874\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/489874\/\">\n<p>\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0436 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0435\u0441\u043b\u0438 \u044f \u0442\u0443\u0442, \u043d\u0430 IT \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0435 \u0425\u0430\u0431\u0440\u0430, \u0441\u043a\u0430\u0436\u0443 \u0447\u0442\u043e \u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u0430\u043b\u0443\u044e \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f OS \u0443 \u043c\u0435\u043d\u044f Linux, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u043b\u044f Windows. \u0418 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 Windows \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 exe \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u0421 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 C \u0438 C++ \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442, \u0434\u0430\u0432\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 <code>MinGW<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u041f\u0440\u043e <code>Python<\/code> \u0438 <code>Java<\/code> \u0434\u0430\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0438\u0445 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e. \u041d\u043e \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u043e\u0432\u043e\u043c\u043e\u0434\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043a\u0430\u043a Rust. \u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0433\u043e \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Rust \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 <code>cargo<\/code> \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447 <code>--target<\/code>, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 ABI \u0438 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0437 Linux \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c exe, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f Windows. \u041d\u043e \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">cargo build --target x86_64-pc-windows-gnu<\/code><\/pre>\n<p>  <\/p>\n<p>\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u043b\u0438\u043d\u043a\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">error: linking with `gcc` failed: exit code: 1  [...]    = note: \/usr\/bin\/ld: unrecognized option '--nxcompat'           \/usr\/bin\/ld: use the --help option for usage information           collect2: error: ld returned 1 exit status  error: aborting due to previous error  error: could not compile `foobar`.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u044f \u044d\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u043b \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043c\u043e\u0433\u0443 \u043a\u0440\u043e\u0441\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Rust \u0434\u043b\u044f Windows, \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u044f Linux, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-299257","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299257"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299257\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}