{"id":457672,"date":"2025-04-28T03:16:57","date_gmt":"2025-04-28T03:16:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457672"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457672","title":{"rendered":"<span>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Cargo<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u041d\u0430\u00a0\u0434\u0432\u043e\u0440\u0435 2025, \u0438 \u0443\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0441\u0432\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u00a0\u0441\u0431\u043e\u0440\u043a\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0412\u00a0Rust \u0437\u0430\u00a0\u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 <strong>Cargo<\/strong>\u00a0\u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0451\u0442 \u043d\u0430\u00a0\u0441\u0435\u0431\u044f \u0432\u0441\u0451: \u043e\u0442\u00a0\u043c\u0435\u043d\u0435\u0434\u0436\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043e\u00a0\u0442\u0435\u0441\u0442\u043e\u0432, \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432 \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0438 \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>. <\/p>\n<p>\u0418 \u0432\u043e\u0442 \u044d\u0442\u043e \u043c\u044b \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435: \u043a\u0430\u043a\u00a0\u0443\u0441\u0442\u0440\u043e\u0435\u043d Cargo \u0438\u0437\u043d\u0443\u0442\u0440\u0438, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d <code>Cargo.toml<\/code>, \u043a\u0430\u043a\u00a0\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u0443\u0434\u0430 \u043f\u0430\u0434\u0430\u044e\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0447\u0442\u043e\u00a0\u0434\u0435\u043b\u0430\u0435\u0442 <code>cargo check<\/code>, \u043a\u0430\u043a\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430\u0442\u044c, \u0438 \u043a\u0430\u043a\u00a0\u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u0440\u0435\u0439\u0442 \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Cargo \u0438 \u0437\u0430\u0447\u0435\u043c \u0442\u0435\u0431\u0435 Cargo.toml<\/h3>\n<p>Cargo\u00a0\u2014 \u044d\u0442\u043e \u043d\u0435\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0441\u0431\u043e\u0440\u0449\u0438\u043a\u00bb \u0438\u043b\u0438 \u00ab\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439\u00bb. \u042d\u0442\u043e <strong>\u0435\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430<\/strong> \u0432\u00a0Rust\u2011\u043f\u0440\u043e\u0435\u043a\u0442: \u043e\u0442\u00a0\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0441\u0431\u043e\u0440\u043a\u0438\u00a0\u2014 \u0434\u043e\u00a0\u0442\u0435\u0441\u0442\u043e\u0432, \u0431\u0435\u043d\u0447\u0435\u0439, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041e\u043d \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0435 \u00ab\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u043d\u0430\u0434\u043e \u043a\u0430\u043a\u00a0\u0443\u00a0pip\/npm\u00bb\u00a0\u2014 \u0430\u00a0\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <strong>\u0432\u00a0Rust \u0438\u043d\u0430\u0447\u0435 \u043d\u0435\u043b\u044c\u0437\u044f<\/strong>. \u042f\u0437\u044b\u043a \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439, \u0441\u00a0\u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 zero\u2011cost\u2011\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f\u043c\u0438. \u0411\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430\u00a0Rust\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0430\u0441\u044c\u00a0\u0431\u044b \u0432\u00a0\u0431\u043e\u043b\u043e\u0442\u043e \u0438\u0437 <code>rustc<\/code>\u2011\u0444\u043b\u0430\u0433\u043e\u0432, \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u0440\u0435\u0439\u0442\u043e\u0432, \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u00a0\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u043b\u0434\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Cargo \u0441\u0442\u0430\u043b \u0447\u0430\u0441\u0442\u044c\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u00a0\u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430\u00a0\u2014 \u043d\u0435\u00a0\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439, \u0430\u00a0\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442\u044c <code>.rs<\/code> \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 <code>rustc<\/code>, \u043d\u043e\u00a0\u044d\u0442\u043e \u043a\u0430\u043a\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Kubernetes \u0447\u0435\u0440\u0435\u0437 <code>bash<\/code>\u2011\u0441\u043a\u0440\u0438\u043f\u0442\u044b. Cargo \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435\u00a0\u2014 \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e <strong>\u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441\u043d\u043e<\/strong>. \u0412\u0441\u0435 Rust\u2011\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0438 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. <\/p>\n<p>\u0424\u0430\u0439\u043b <code>Cargo.toml<\/code>\u00a0\u2014 \u044d\u0442\u043e \u044f\u0434\u0440\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u043d\u0435\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u0430\u043a <code>requirements.txt<\/code> \u0438\u043b\u0438 <code>package.json<\/code>. \u042d\u0442\u043e <strong>\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 API \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/strong>, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Cargo \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u043a\u0430\u043a\u00a0\u0435\u0433\u043e \u0437\u043e\u0432\u0443\u0442,<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u043e\u0439 \u0443\u00a0\u043d\u0435\u0433\u043e edition,<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 dev, build, optional),<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 features \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b,<\/p>\n<\/li>\n<li>\n<p>\u0433\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438,<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438,<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e\u00a0\u043a\u043b\u0430\u0441\u0442\u044c \u0432\u00a0\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0438\u00a0\u0442.\u00a0\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0438\u043c\u0435\u043d\u043d\u043e <code>Cargo.toml<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e\u00a0\u0432\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u00a0\u0431\u044b 10\u00a0\u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, 3\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u043e\u0434\u0438\u043d <code>build.rs<\/code>.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442. \u041f\u0438\u0448\u0435\u043c \u043d\u0430\u00a0Rust. \u0423\u00a0\u043d\u0430\u0441 <strong>\u043e\u0431\u044f\u0437\u0430\u043d<\/strong>\u00a0\u0431\u044b\u0442\u044c <code>Cargo.toml<\/code> \u0432\u00a0\u043a\u043e\u0440\u043d\u0435. \u042d\u0442\u043e <code>manifest<\/code>:<\/p>\n<pre><code class=\"bash\">[package] name = \"my_cool_app\" version = \"0.1.0\" edition = \"2021\"  [dependencies] serde = { version = \"1.0\", features = [\"derive\"] }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0451:<\/p>\n<ul>\n<li>\n<p>\u0438\u043c\u044f \u043a\u0440\u0435\u0439\u0442\u0430,<\/p>\n<\/li>\n<li>\n<p>\u0432\u0435\u0440\u0441\u0438\u044f,<\/p>\n<\/li>\n<li>\n<p>Rust edition (<code>2015<\/code>, <code>2018<\/code>, <code>2021<\/code>\u00a0\u2014 \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f\u00a0async\/await),<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0438\u0445 \u0444\u0438\u0447\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0447\u0435\u0448\u044c dev\u2011\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0442\u0435\u0441\u0442\u044b, \u0431\u0435\u043d\u0447\u0438)? \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c:<\/p>\n<pre><code class=\"bash\">[dev-dependencies] criterion = \"0.5\"<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0430\u00a0\u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438?<\/p>\n<pre><code class=\"bash\">[build-dependencies] cc = \"1.0\"<\/code><\/pre>\n<p>\u041d\u0443\u0436\u0435\u043d workspace \u0438\u0437\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u0440\u0435\u0439\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">[workspace] members = [     \"core-lib\",     \"cli\",     \"server\", ]<\/code><\/pre>\n<p>\u0418 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 <code>requirements.txt<\/code>, <code>setup.py<\/code>, <code>package.json<\/code>\u00a0\u2014 \u0432\u0441\u0451 \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043a\u0440\u0435\u0439\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code><strong>serde<\/strong><\/code><strong> \/ <\/strong><code><strong>serde_json<\/strong><\/code>\u00a0\u2014 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u00a0\u043b\u044e\u0431\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b (JSON, TOML, YAML \u0438\u00a0\u0442.\u00a0\u0434.).<\/p>\n<\/li>\n<li>\n<p><code><strong>anyhow<\/strong><\/code>\u00a0\u2014 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u00a0\u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0431\u0435\u0437\u00a0\u0434\u0440\u0430\u043c\u044b, \u0441\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438 \u0438 backtrace.<\/p>\n<\/li>\n<li>\n<p><code><strong>thiserror<\/strong><\/code>\u00a0\u2014 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0434\u043b\u044f\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u0435\u0437\u00a0\u0431\u043e\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code><strong>log<\/strong><\/code><strong> + <\/strong><code><strong>env_logger<\/strong><\/code><strong> \/ <\/strong><code><strong>tracing<\/strong><\/code>\u00a0\u2014 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041f\u0435\u0440\u0432\u044b\u0439\u00a0\u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430, \u0432\u0442\u043e\u0440\u043e\u0439\u00a0\u2014 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0438 async\u2011friendly.<\/p>\n<\/li>\n<li>\n<p><code><strong>reqwest<\/strong><\/code>\u00a0\u2014 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 HTTP\u2011\u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u00a0\u0431\u0430\u0437\u0435 <code>hyper<\/code>.<\/p>\n<\/li>\n<li>\n<p><code><strong>tokio<\/strong><\/code><strong> \/ <\/strong><code><strong>async-std<\/strong><\/code>\u00a0\u2014 async runtime&#8217;\u044b. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d, \u0431\u0435\u0437\u00a0\u043d\u0438\u0445 \u043d\u0438\u043a\u0443\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><code><strong>clap<\/strong><\/code><strong> \/ <\/strong><code><strong>argh<\/strong><\/code>\u00a0\u2014 \u0434\u043b\u044f\u00a0CLI\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0435\u0437\u00a0\u0448\u0430\u043c\u0430\u043d\u0441\u0442\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><code><strong>rayon<\/strong><\/code>\u00a0\u2014 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b: \u0445\u043e\u0447\u0435\u0448\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u0431\u0435\u0437\u00a0\u0440\u0443\u0447\u043d\u043e\u0433\u043e <code>thread::spawn<\/code>? \u0412\u043e\u0442 \u043e\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><code><strong>regex<\/strong><\/code>\u00a0\u2014 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438,\u00a0\u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p><code><strong>crossbeam<\/strong><\/code>\u00a0\u2014 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code><strong>lazy_static<\/strong><\/code><strong> \/ <\/strong><code><strong>once_cell<\/strong><\/code>\u00a0\u2014 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043b\u0435\u043d\u0438\u0432\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code><strong>dashmap<\/strong><\/code>\u00a0\u2014 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439 <code>HashMap<\/code>.<\/p>\n<\/li>\n<li>\n<p><code><strong>uuid<\/strong><\/code>\u00a0\u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f UUID&#8217;\u043e\u0432 \u0432\u0441\u0435\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/h3>\n<p>Cargo \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <strong>crates.io<\/strong> \u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0423\u043a\u0430\u0437\u0430\u043b \u0438\u043c\u044f \u0438 \u0432\u0435\u0440\u0441\u0438\u044e\u00a0\u2014 \u0438 \u043f\u043e\u0435\u0445\u0430\u043b\u0438:<\/p>\n<pre><code>[dependencies] chrono = \"0.4\"<\/code><\/pre>\n<p>\u041d\u0443\u0436\u0435\u043d git?<\/p>\n<pre><code>serde_json = { git = \"https:\/\/github.com\/serde-rs\/json\", branch = \"main\" }<\/code><\/pre>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e?<\/p>\n<pre><code>my_utils = { path = \"..\/utils\" }<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0438\u0447\u0438?<\/p>\n<pre><code>tokio = { version = \"1.0\", features = [\"macros\", \"rt-multi-thread\"] }<\/code><\/pre>\n<p>\u041c\u044b \u0441\u0430\u043c\u0438 \u0440\u0435\u0448\u0430\u0435\u043c, \u043a\u0430\u043a\u00a0\u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. Cargo \u0441\u0430\u043c \u0441\u043a\u0430\u0447\u0430\u0435\u0442, \u043f\u0440\u043e\u043a\u0430\u0435\u0448\u0438\u0440\u0443\u0435\u0442, \u043e\u0442\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442, \u043f\u043e\u043b\u043e\u0436\u0438\u0442 \u0432 <code>~\/.cargo<\/code> \u0438 <code>target\/<\/code>.<\/p>\n<h3>\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438: .cargo, target\/, \u043a\u0435\u0448, \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>cargo build<\/code>, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>Cargo \u0447\u0438\u0442\u0430\u0435\u0442 <code>Cargo.toml<\/code> + <code>Cargo.lock<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435\u00a0\u0432\u00a0\u043a\u0435\u0448\u0435).<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0434\u0451\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 <code>~\/.cargo\/registry\/src\/<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 dependency \u0432\u00a0\u0432\u0438\u0434\u0435 <code>.rlib<\/code>, <code>.d<\/code>, <code>.rmeta<\/code> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0434\u0451\u0442 \u0432\u0441\u0451 \u0432 <code>target\/debug\/deps\/<\/code>.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0413\u0434\u0435 \u0438 \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f?<\/h4>\n<pre><code class=\"bash\">project\/ \u251c\u2500\u2500 Cargo.toml \u251c\u2500\u2500 Cargo.lock \u251c\u2500\u2500 src\/ \u2502   \u2514\u2500\u2500 main.rs \u2514\u2500\u2500 target\/     \u251c\u2500\u2500 debug\/     \u2502   \u251c\u2500\u2500 deps\/      # \u0412\u0441\u0435 .rlib \u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438     \u2502   \u2514\u2500\u2500 build\/     # \u0412\u044b\u0432\u043e\u0434 \u0441\u0431\u043e\u0440\u043a\u0438 build.rs     \u251c\u2500\u2500 release\/       # \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0438\u043b\u0434     \u2514\u2500\u2500 incremental\/   # \u041a\u0435\u0448 \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438<\/code><\/pre>\n<h4>\u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0434\u0435\u0441\u044c:<\/h4>\n<pre><code>target\/debug\/my_cool_app<\/code><\/pre>\n<p>\u0410\u00a0\u0435\u0441\u043b\u0438:<\/p>\n<pre><code class=\"bash\">cargo build --release<\/code><\/pre>\n<p>\u0422\u043e \u0437\u0434\u0435\u0441\u044c:<\/p>\n<pre><code>target\/release\/my_cool_app<\/code><\/pre>\n<h3>cargo check<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u0444\u0430\u0437\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 <strong>\u0434\u043e<\/strong>\u00a0\u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438. \u0422\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/strong>\u00a0\u2014 \u043a\u0430\u043a <code>rustc<\/code>, \u043d\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0438\u043f\u043e\u0432<\/strong>\u00a0\u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u044b\u0432\u043e\u0434 \u0442\u0438\u043f\u043e\u0432 (<code>let x = ...<\/code> \u0431\u0435\u0437\u00a0\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438? \u043d\u0435\u00a0\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430).<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043e\u043d\u044f\u0435\u0442 <\/strong><code><strong>borrow checker<\/strong><\/code>\u00a0\u2014 \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u043d\u043e\u00a0\u0431\u044b\u043b\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u00abcannot borrow <code>foo<\/code> as mutable\u00bb \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 lifetime&#8217;\u043e\u0432<\/strong>\u00a0\u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u0432\u0442\u044b\u043a\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043c, \u0433\u0434\u0435 <code>'a<\/code> \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u0435\u0442 \u0441 <code>'static<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041d\u043e<\/strong>: \u043e\u043d <strong>\u043d\u0435\u00a0\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a<\/strong>, <strong>\u043d\u0435\u00a0\u043b\u0438\u043d\u043a\u0443\u0435\u0442<\/strong> \u0438 <strong>\u043d\u0435\u00a0\u0442\u0440\u0430\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f<\/strong> \u043d\u0430\u00a0\u0432\u0441\u044f\u043a\u043e\u0435\u00a0\u043b\u0438\u0448\u043d\u0435\u0435.<\/p>\n<h4>\u041a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h4>\n<p><strong>\u0412\u0441\u0435\u0433\u0434\u0430<\/strong>, \u043a\u043e\u0433\u0434\u0430:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u043c\u0435\u043d\u044f\u043b \u0442\u0438\u043f \u043f\u043e\u043b\u044f \u0432\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00a0\u2014 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0433\u0434\u0435 \u0435\u0449\u0451 \u0432\u0441\u0451 \u043e\u0442\u0432\u0430\u043b\u0438\u0442\u0441\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0448\u044c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0431\u044b\u0441\u0442\u0440\u043e \u0444\u0438\u043a\u0441\u0438\u043c compile\u2011time \u043e\u0448\u0438\u0431\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 (\u043e\u043d \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u043a <code>tsc --noEmit<\/code> \u0434\u043b\u044f\u00a0Rust).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">cargo check<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code>Checking my_cool_app v0.1.0 (\/home\/me\/projects\/my_cool_app) error[E0308]: mismatched types  --&gt; src\/main.rs:7:20   | 7 |     let name: i32 = \"Ivan\";   |                    ^^^^^^^^ expected `i32`, found `&amp;str`<\/code><\/pre>\n<p><strong>\u0418 \u0431\u043e\u043d\u0443\u0441: \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u00a0features, \u0442\u0430\u0440\u0433\u0435\u0442\u0430\u043c\u0438 \u0438 workspace&#8217;\u0430\u043c\u0438<\/strong><\/p>\n<p>\u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">cargo check --features \"tls async\"<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043b\u044f\u00a0\u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code class=\"bash\">cargo check --release<\/code><\/pre>\n<p>\u0422\u0430\u0440\u0433\u0435\u0442 \u043d\u0430\u00a0ARM:<\/p>\n<pre><code class=\"bash\">cargo check --target armv7-unknown-linux-gnueabihf<\/code><\/pre>\n<h3>cargo run: \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445<\/h3>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre><code class=\"bash\">cargo run -- --config .\/config.yml <\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<pre><code class=\"bash\">cargo build .\/target\/debug\/my_cool_app --config .\/config.yml<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e:<\/p>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u044c (\u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e):<\/p>\n<pre><code class=\"bash\">cargo run --bin server<\/code><\/pre>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u00a0\u0444\u0438\u0447\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">cargo run --features \"use_tls\"<\/code><\/pre>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u043b\u044f\u00a0\u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0430\u0440\u0433\u0435\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>armv7<\/code>):<\/p>\n<pre><code class=\"bash\">cargo run --target armv7-unknown-linux-gnueabihf<\/code><\/pre>\n<h3>cargo bench<\/h3>\n<p>\u0412\u00a0\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0435\u043d\u0447\u0435\u0439, \u043d\u043e\u00a0\u043e\u043d\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 nightly. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"rust\">#![feature(test)]  extern crate test; use test::Bencher;  #[bench] fn bench_sum(b: &amp;mut Bencher) {     let data: Vec&lt;u64&gt; = (1..1_000_000).collect();     b.iter(|| data.iter().sum::&lt;u64&gt;()); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u00a0\u043b\u044e\u0431\u0438\u043c nightly, \u0431\u0435\u0440\u0435\u043c criterion.rs:<\/p>\n<pre><code>[dev-dependencies] criterion = \"0.5\"<\/code><\/pre>\n<pre><code class=\"rust\">use criterion::{criterion_group, criterion_main, Criterion};  fn bench_add(c: &amp;mut Criterion) {     c.bench_function(\"sum 1..1000\", |b| {         b.iter(|| (1..1000).sum::&lt;u64&gt;());     }); }  criterion_group!(benches, bench_add); criterion_main!(benches); <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre><code class=\"bash\">cargo bench<\/code><\/pre>\n<h3>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u0440\u0435\u0439\u0442 \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 crates.io<\/h3>\n<h4>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>. \u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 GitHub. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u043c \u0432 <code>\/me<\/code> \u2192 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c API Token<\/p>\n<pre><code class=\"bash\">cargo login &lt;\u0442\u043e\u043a\u0435\u043d&gt;<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"fastmath\" version = \"0.1.0\" edition = \"2021\" description = \"Fast math utilities for Rust\" license = \"MIT OR Apache-2.0\" repository = \"https:\/\/github.com\/user\/fastmath\" readme = \"README.md\" keywords = [\"math\", \"fast\", \"utils\"] categories = [\"algorithms\"]<\/code><\/pre>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c README.md \u0438 LICENSE<\/h4>\n<pre><code class=\"bash\">touch README.md echo \"MIT\" &gt; LICENSE<\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/h4>\n<pre><code class=\"bash\">cargo package     # \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u043e\u043a cargo publish     # \u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0439<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u0440\u0435\u0439\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">[dependencies] fastmath = \"0.1\"<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0423\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0441\u0432\u043e\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b. \u0423\u00a0Rust\u00a0\u2014 Cargo. \u041e\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e\u00a0\u043d\u0443\u0436\u043d\u043e: \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0431\u043e\u0440\u043a\u0430, \u0442\u0435\u0441\u0442\u044b, \u0431\u0435\u043d\u0447\u0438, \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f. <\/p>\n<p>\u0410\u00a0\u0435\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0451 \u043d\u0435\u00a0\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u043a\u0440\u0435\u0439\u0442\u044b\u00a0\u2014 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u0442\u044c.<\/p>\n<hr\/>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u043e\u00a0Rust \u0438 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043d\u0430\u00a0\u0441\u0435\u0440\u0438\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432, \u0433\u0434\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u00a0\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u043d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043d\u0438\u0436\u0435:<\/p>\n<ul>\n<li>\n<p><strong>23\u00a0\u0430\u043f\u0440\u0435\u043b\u044f<\/strong>\u00a0\u2014 <a href=\"https:\/\/otus.pw\/PeUM\/\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u00ab?\u00bb. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 Result \u0438 Option<\/a><\/p>\n<\/li>\n<li>\n<p><strong>6\u00a0\u043c\u0430\u044f<\/strong>\u00a0\u2014 <a href=\"https:\/\/otus.pw\/lasI\/\">\u041f\u0438\u0448\u0435\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430\u00a0Rust \u0441\u00a0\u043d\u0443\u043b\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><strong>22\u00a0\u043c\u0430\u044f<\/strong>\u00a0\u2014 <a href=\"https:\/\/otus.pw\/l1NM\/\">\u0417\u0430\u00a0\u0447\u0442\u043e\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043b\u044e\u0431\u044f\u0442 Rust<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/902584\/\"> https:\/\/habr.com\/ru\/articles\/902584\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u041d\u0430\u00a0\u0434\u0432\u043e\u0440\u0435 2025, \u0438 \u0443\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0441\u0432\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u00a0\u0441\u0431\u043e\u0440\u043a\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0412\u00a0Rust \u0437\u0430\u00a0\u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 <strong>Cargo<\/strong>\u00a0\u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0451\u0442 \u043d\u0430\u00a0\u0441\u0435\u0431\u044f \u0432\u0441\u0451: \u043e\u0442\u00a0\u043c\u0435\u043d\u0435\u0434\u0436\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043e\u00a0\u0442\u0435\u0441\u0442\u043e\u0432, \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432 \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0438 \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>. <\/p>\n<p>\u0418 \u0432\u043e\u0442 \u044d\u0442\u043e \u043c\u044b \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435: \u043a\u0430\u043a\u00a0\u0443\u0441\u0442\u0440\u043e\u0435\u043d Cargo \u0438\u0437\u043d\u0443\u0442\u0440\u0438, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d <code>Cargo.toml<\/code>, \u043a\u0430\u043a\u00a0\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u0443\u0434\u0430 \u043f\u0430\u0434\u0430\u044e\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0447\u0442\u043e\u00a0\u0434\u0435\u043b\u0430\u0435\u0442 <code>cargo check<\/code>, \u043a\u0430\u043a\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430\u0442\u044c, \u0438 \u043a\u0430\u043a\u00a0\u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u0440\u0435\u0439\u0442 \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Cargo \u0438 \u0437\u0430\u0447\u0435\u043c \u0442\u0435\u0431\u0435 Cargo.toml<\/h3>\n<p>Cargo\u00a0\u2014 \u044d\u0442\u043e \u043d\u0435\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0441\u0431\u043e\u0440\u0449\u0438\u043a\u00bb \u0438\u043b\u0438 \u00ab\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439\u00bb. \u042d\u0442\u043e <strong>\u0435\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430<\/strong> \u0432\u00a0Rust\u2011\u043f\u0440\u043e\u0435\u043a\u0442: \u043e\u0442\u00a0\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0441\u0431\u043e\u0440\u043a\u0438\u00a0\u2014 \u0434\u043e\u00a0\u0442\u0435\u0441\u0442\u043e\u0432, \u0431\u0435\u043d\u0447\u0435\u0439, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041e\u043d \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0435 \u00ab\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u043d\u0430\u0434\u043e \u043a\u0430\u043a\u00a0\u0443\u00a0pip\/npm\u00bb\u00a0\u2014 \u0430\u00a0\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <strong>\u0432\u00a0Rust \u0438\u043d\u0430\u0447\u0435 \u043d\u0435\u043b\u044c\u0437\u044f<\/strong>. \u042f\u0437\u044b\u043a \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439, \u0441\u00a0\u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 zero\u2011cost\u2011\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f\u043c\u0438. \u0411\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430\u00a0Rust\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0430\u0441\u044c\u00a0\u0431\u044b \u0432\u00a0\u0431\u043e\u043b\u043e\u0442\u043e \u0438\u0437 <code>rustc<\/code>\u2011\u0444\u043b\u0430\u0433\u043e\u0432, \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u0440\u0435\u0439\u0442\u043e\u0432, \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u00a0\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u043b\u0434\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Cargo \u0441\u0442\u0430\u043b \u0447\u0430\u0441\u0442\u044c\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u00a0\u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430\u00a0\u2014 \u043d\u0435\u00a0\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439, \u0430\u00a0\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442\u044c <code>.rs<\/code> \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 <code>rustc<\/code>, \u043d\u043e\u00a0\u044d\u0442\u043e \u043a\u0430\u043a\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Kubernetes \u0447\u0435\u0440\u0435\u0437 <code>bash<\/code>\u2011\u0441\u043a\u0440\u0438\u043f\u0442\u044b. Cargo \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435\u00a0\u2014 \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e <strong>\u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441\u043d\u043e<\/strong>. \u0412\u0441\u0435 Rust\u2011\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0438 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. <\/p>\n<p>\u0424\u0430\u0439\u043b <code>Cargo.toml<\/code>\u00a0\u2014 \u044d\u0442\u043e \u044f\u0434\u0440\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u043d\u0435\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u0430\u043a <code>requirements.txt<\/code> \u0438\u043b\u0438 <code>package.json<\/code>. \u042d\u0442\u043e <strong>\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 API \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/strong>, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Cargo \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u043a\u0430\u043a\u00a0\u0435\u0433\u043e \u0437\u043e\u0432\u0443\u0442,<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u043e\u0439 \u0443\u00a0\u043d\u0435\u0433\u043e edition,<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 dev, build, optional),<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 features \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b,<\/p>\n<\/li>\n<li>\n<p>\u0433\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438,<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438,<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e\u00a0\u043a\u043b\u0430\u0441\u0442\u044c \u0432\u00a0\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0438\u00a0\u0442.\u00a0\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0438\u043c\u0435\u043d\u043d\u043e <code>Cargo.toml<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e\u00a0\u0432\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u00a0\u0431\u044b 10\u00a0\u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, 3\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u043e\u0434\u0438\u043d <code>build.rs<\/code>.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442. \u041f\u0438\u0448\u0435\u043c \u043d\u0430\u00a0Rust. \u0423\u00a0\u043d\u0430\u0441 <strong>\u043e\u0431\u044f\u0437\u0430\u043d<\/strong>\u00a0\u0431\u044b\u0442\u044c <code>Cargo.toml<\/code> \u0432\u00a0\u043a\u043e\u0440\u043d\u0435. \u042d\u0442\u043e <code>manifest<\/code>:<\/p>\n<pre><code class=\"bash\">[package] name = \"my_cool_app\" version = \"0.1.0\" edition = \"2021\"  [dependencies] serde = { version = \"1.0\", features = [\"derive\"] }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0451:<\/p>\n<ul>\n<li>\n<p>\u0438\u043c\u044f \u043a\u0440\u0435\u0439\u0442\u0430,<\/p>\n<\/li>\n<li>\n<p>\u0432\u0435\u0440\u0441\u0438\u044f,<\/p>\n<\/li>\n<li>\n<p>Rust edition (<code>2015<\/code>, <code>2018<\/code>, <code>2021<\/code>\u00a0\u2014 \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f\u00a0async\/await),<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0438\u0445 \u0444\u0438\u0447\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0447\u0435\u0448\u044c dev\u2011\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0442\u0435\u0441\u0442\u044b, \u0431\u0435\u043d\u0447\u0438)? \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c:<\/p>\n<pre><code class=\"bash\">[dev-dependencies] criterion = \"0.5\"<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0430\u00a0\u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438?<\/p>\n<pre><code class=\"bash\">[build-dependencies] cc = \"1.0\"<\/code><\/pre>\n<p>\u041d\u0443\u0436\u0435\u043d workspace \u0438\u0437\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u0440\u0435\u0439\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">[workspace] members = [     \"core-lib\",     \"cli\",     \"server\", ]<\/code><\/pre>\n<p>\u0418 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 <code>requirements.txt<\/code>, <code>setup.py<\/code>, <code>package.json<\/code>\u00a0\u2014 \u0432\u0441\u0451 \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043a\u0440\u0435\u0439\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code><strong>serde<\/strong><\/code><strong> \/ <\/strong><code><strong>serde_json<\/strong><\/code>\u00a0\u2014 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u00a0\u043b\u044e\u0431\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b (JSON, TOML, YAML \u0438\u00a0\u0442.\u00a0\u0434.).<\/p>\n<\/li>\n<li>\n<p><code><strong>anyhow<\/strong><\/code>\u00a0\u2014 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u00a0\u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0431\u0435\u0437\u00a0\u0434\u0440\u0430\u043c\u044b, \u0441\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438 \u0438 backtrace.<\/p>\n<\/li>\n<li>\n<p><code><strong>thiserror<\/strong><\/code>\u00a0\u2014 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0434\u043b\u044f\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u0435\u0437\u00a0\u0431\u043e\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p><code><strong>log<\/strong><\/code><strong> + <\/strong><code><strong>env_logger<\/strong><\/code><strong> \/ <\/strong><code><strong>tracing<\/strong><\/code>\u00a0\u2014 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041f\u0435\u0440\u0432\u044b\u0439\u00a0\u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430, \u0432\u0442\u043e\u0440\u043e\u0439\u00a0\u2014 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0438 async\u2011friendly.<\/p>\n<\/li>\n<li>\n<p><code><strong>reqwest<\/strong><\/code>\u00a0\u2014 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 HTTP\u2011\u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u00a0\u0431\u0430\u0437\u0435 <code>hyper<\/code>.<\/p>\n<\/li>\n<li>\n<p><code><strong>tokio<\/strong><\/code><strong> \/ <\/strong><code><strong>async-std<\/strong><\/code>\u00a0\u2014 async runtime&#8217;\u044b. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d, \u0431\u0435\u0437\u00a0\u043d\u0438\u0445 \u043d\u0438\u043a\u0443\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><code><strong>clap<\/strong><\/code><strong> \/ <\/strong><code><strong>argh<\/strong><\/code>\u00a0\u2014 \u0434\u043b\u044f\u00a0CLI\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0435\u0437\u00a0\u0448\u0430\u043c\u0430\u043d\u0441\u0442\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><code><strong>rayon<\/strong><\/code>\u00a0\u2014 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b: \u0445\u043e\u0447\u0435\u0448\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u0431\u0435\u0437\u00a0\u0440\u0443\u0447\u043d\u043e\u0433\u043e <code>thread::spawn<\/code>? \u0412\u043e\u0442 \u043e\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><code><strong>regex<\/strong><\/code>\u00a0\u2014 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438,\u00a0\u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p><code><strong>crossbeam<\/strong><\/code>\u00a0\u2014 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code><strong>lazy_static<\/strong><\/code><strong> \/ <\/strong><code><strong>once_cell<\/strong><\/code>\u00a0\u2014 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043b\u0435\u043d\u0438\u0432\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code><strong>dashmap<\/strong><\/code>\u00a0\u2014 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439 <code>HashMap<\/code>.<\/p>\n<\/li>\n<li>\n<p><code><strong>uuid<\/strong><\/code>\u00a0\u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f UUID&#8217;\u043e\u0432 \u0432\u0441\u0435\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/h3>\n<p>Cargo \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <strong>crates.io<\/strong> \u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0423\u043a\u0430\u0437\u0430\u043b \u0438\u043c\u044f \u0438 \u0432\u0435\u0440\u0441\u0438\u044e\u00a0\u2014 \u0438 \u043f\u043e\u0435\u0445\u0430\u043b\u0438:<\/p>\n<pre><code>[dependencies] chrono = \"0.4\"<\/code><\/pre>\n<p>\u041d\u0443\u0436\u0435\u043d git?<\/p>\n<pre><code>serde_json = { git = \"https:\/\/github.com\/serde-rs\/json\", branch = \"main\" }<\/code><\/pre>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e?<\/p>\n<pre><code>my_utils = { path = \"..\/utils\" }<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0438\u0447\u0438?<\/p>\n<pre><code>tokio = { version = \"1.0\", features = [\"macros\", \"rt-multi-thread\"] }<\/code><\/pre>\n<p>\u041c\u044b \u0441\u0430\u043c\u0438 \u0440\u0435\u0448\u0430\u0435\u043c, \u043a\u0430\u043a\u00a0\u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. Cargo \u0441\u0430\u043c \u0441\u043a\u0430\u0447\u0430\u0435\u0442, \u043f\u0440\u043e\u043a\u0430\u0435\u0448\u0438\u0440\u0443\u0435\u0442, \u043e\u0442\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442, \u043f\u043e\u043b\u043e\u0436\u0438\u0442 \u0432 <code>~\/.cargo<\/code> \u0438 <code>target\/<\/code>.<\/p>\n<h3>\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438: .cargo, target\/, \u043a\u0435\u0448, \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>cargo build<\/code>, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>Cargo \u0447\u0438\u0442\u0430\u0435\u0442 <code>Cargo.toml<\/code> + <code>Cargo.lock<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435\u00a0\u0432\u00a0\u043a\u0435\u0448\u0435).<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0434\u0451\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 <code>~\/.cargo\/registry\/src\/<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 dependency \u0432\u00a0\u0432\u0438\u0434\u0435 <code>.rlib<\/code>, <code>.d<\/code>, <code>.rmeta<\/code> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0434\u0451\u0442 \u0432\u0441\u0451 \u0432 <code>target\/debug\/deps\/<\/code>.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0413\u0434\u0435 \u0438 \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f?<\/h4>\n<pre><code class=\"bash\">project\/ \u251c\u2500\u2500 Cargo.toml \u251c\u2500\u2500 Cargo.lock \u251c\u2500\u2500 src\/ \u2502   \u2514\u2500\u2500 main.rs \u2514\u2500\u2500 target\/     \u251c\u2500\u2500 debug\/     \u2502   \u251c\u2500\u2500 deps\/      # \u0412\u0441\u0435 .rlib \u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438     \u2502   \u2514\u2500\u2500 build\/     # \u0412\u044b\u0432\u043e\u0434 \u0441\u0431\u043e\u0440\u043a\u0438 build.rs     \u251c\u2500\u2500 release\/       # \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0438\u043b\u0434     \u2514\u2500\u2500 incremental\/   # \u041a\u0435\u0448 \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438<\/code><\/pre>\n<h4>\u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0434\u0435\u0441\u044c:<\/h4>\n<pre><code>target\/debug\/my_cool_app<\/code><\/pre>\n<p>\u0410\u00a0\u0435\u0441\u043b\u0438:<\/p>\n<pre><code class=\"bash\">cargo build --release<\/code><\/pre>\n<p>\u0422\u043e \u0437\u0434\u0435\u0441\u044c:<\/p>\n<pre><code>target\/release\/my_cool_app<\/code><\/pre>\n<h3>cargo check<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u0444\u0430\u0437\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 <strong>\u0434\u043e<\/strong>\u00a0\u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438. \u0422\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/strong>\u00a0\u2014 \u043a\u0430\u043a <code>rustc<\/code>, \u043d\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u0438\u043f\u043e\u0432<\/strong>\u00a0\u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u044b\u0432\u043e\u0434 \u0442\u0438\u043f\u043e\u0432 (<code>let x = ...<\/code> \u0431\u0435\u0437\u00a0\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438? \u043d\u0435\u00a0\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430).<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043e\u043d\u044f\u0435\u0442 <\/strong><code><strong>borrow checker<\/strong><\/code>\u00a0\u2014 \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u043d\u043e\u00a0\u0431\u044b\u043b\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u00abcannot borrow <code>foo<\/code> as mutable\u00bb \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 lifetime&#8217;\u043e\u0432<\/strong>\u00a0\u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u0432\u0442\u044b\u043a\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043c, \u0433\u0434\u0435 <code>'a<\/code> \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u0435\u0442 \u0441 <code>'static<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041d\u043e<\/strong>: \u043e\u043d <strong>\u043d\u0435\u00a0\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a<\/strong>, <strong>\u043d\u0435\u00a0\u043b\u0438\u043d\u043a\u0443\u0435\u0442<\/strong> \u0438 <strong>\u043d\u0435\u00a0\u0442\u0440\u0430\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f<\/strong> \u043d\u0430\u00a0\u0432\u0441\u044f\u043a\u043e\u0435\u00a0\u043b\u0438\u0448\u043d\u0435\u0435.<\/p>\n<h4>\u041a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h4>\n<p><strong>\u0412\u0441\u0435\u0433\u0434\u0430<\/strong>, \u043a\u043e\u0433\u0434\u0430:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u043c\u0435\u043d\u044f\u043b \u0442\u0438\u043f \u043f\u043e\u043b\u044f \u0432\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00a0\u2014 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0433\u0434\u0435 \u0435\u0449\u0451 \u0432\u0441\u0451 \u043e\u0442\u0432\u0430\u043b\u0438\u0442\u0441\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0448\u044c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0431\u044b\u0441\u0442\u0440\u043e \u0444\u0438\u043a\u0441\u0438\u043c compile\u2011time \u043e\u0448\u0438\u0431\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 (\u043e\u043d \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u043a <code>tsc --noEmit<\/code> \u0434\u043b\u044f\u00a0Rust).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">cargo check<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code>Checking my_cool_app v0.1.0 (\/home\/me\/projects\/my_cool_app) error[E0308]: mismatched types  --&gt; src\/main.rs:7:20   | 7 |     let name: i32 = \"Ivan\";   |                    ^^^^^^^^ expected `i32`, found `&amp;str`<\/code><\/pre>\n<p><strong>\u0418 \u0431\u043e\u043d\u0443\u0441: \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u00a0features, \u0442\u0430\u0440\u0433\u0435\u0442\u0430\u043c\u0438 \u0438 workspace&#8217;\u0430\u043c\u0438<\/strong><\/p>\n<p>\u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">cargo check --features \"tls async\"<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043b\u044f\u00a0\u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code class=\"bash\">cargo check --release<\/code><\/pre>\n<p>\u0422\u0430\u0440\u0433\u0435\u0442 \u043d\u0430\u00a0ARM:<\/p>\n<pre><code class=\"bash\">cargo check --target armv7-unknown-linux-gnueabihf<\/code><\/pre>\n<h3>cargo run: \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445<\/h3>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430:<\/p>\n<pre><code class=\"bash\">cargo run -- --config .\/config.yml <\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<pre><code class=\"bash\">cargo build .\/target\/debug\/my_cool_app --config .\/config.yml<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e:<\/p>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u044c (\u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e):<\/p>\n<pre><code class=\"bash\">cargo run --bin server<\/code><\/pre>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u00a0\u0444\u0438\u0447\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">cargo run --features \"use_tls\"<\/code><\/pre>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u043b\u044f\u00a0\u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0430\u0440\u0433\u0435\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>armv7<\/code>):<\/p>\n<pre><code class=\"bash\">cargo run --target armv7-unknown-linux-gnueabihf<\/code><\/pre>\n<h3>cargo bench<\/h3>\n<p>\u0412\u00a0\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0435\u043d\u0447\u0435\u0439, \u043d\u043e\u00a0\u043e\u043d\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 nightly. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"rust\">#![feature(test)]  extern crate test; use test::Bencher;  #[bench] fn bench_sum(b: &amp;mut Bencher) {     let data: Vec&lt;u64&gt; = (1..1_000_000).collect();     b.iter(|| data.iter().sum::&lt;u64&gt;()); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u00a0\u043b\u044e\u0431\u0438\u043c nightly, \u0431\u0435\u0440\u0435\u043c criterion.rs:<\/p>\n<pre><code>[dev-dependencies] criterion = \"0.5\"<\/code><\/pre>\n<pre><code class=\"rust\">use criterion::{criterion_group, criterion_main, Criterion};  fn bench_add(c: &amp;mut Criterion) {     c.bench_function(\"sum 1..1000\", |b| {         b.iter(|| (1..1000).sum::&lt;u64&gt;());     }); }  criterion_group!(benches, bench_add); criterion_main!(benches); <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre><code class=\"bash\">cargo bench<\/code><\/pre>\n<h3>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u0440\u0435\u0439\u0442 \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 crates.io<\/h3>\n<h4>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <a href=\"http:\/\/crates.io\">crates.io<\/a>. \u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 GitHub. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u043c \u0432 <code>\/me<\/code> \u2192 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c API Token<\/p>\n<pre><code class=\"bash\">cargo login &lt;\u0442\u043e\u043a\u0435\u043d&gt;<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"fastmath\" version = \"0.1.0\" edition = \"2021\" description = \"Fast math utilities for Rust\" license = \"MIT OR Apache-2.0\" repository = \"https:\/\/github.com\/user\/fastmath\" readme = \"README.md\" keywords = [\"math\", \"fast\", \"utils\"] categories = [\"algorithms\"]<\/code><\/pre>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c README.md \u0438 LICENSE<\/h4>\n<pre><code class=\"bash\">touch README.md echo \"MIT\" &gt; LICENSE<\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/h4>\n<pre><code class=\"bash\">cargo package     # \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u043e\u043a cargo publish     # \u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0439<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u0440\u0435\u0439\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">[dependencies] fastmath = \"0.1\"<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0423\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0441\u0432\u043e\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b. \u0423\u00a0Rust\u00a0\u2014 Cargo. \u041e\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e\u00a0\u043d\u0443\u0436\u043d\u043e: \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0431\u043e\u0440\u043a\u0430, \u0442\u0435\u0441\u0442\u044b, \u0431\u0435\u043d\u0447\u0438, \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f. <\/p>\n<p>\u0410\u00a0\u0435\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0451 \u043d\u0435\u00a0\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u043a\u0440\u0435\u0439\u0442\u044b\u00a0\u2014 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u0442\u044c.<\/p>\n<hr\/>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u043e\u00a0Rust \u0438 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043d\u0430\u00a0\u0441\u0435\u0440\u0438\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432, \u0433\u0434\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u00a0\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u043d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043d\u0438\u0436\u0435:<\/p>\n<ul>\n<li>\n<p><strong>23\u00a0\u0430\u043f\u0440\u0435\u043b\u044f<\/strong>\u00a0\u2014 <a href=\"https:\/\/otus.pw\/PeUM\/\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u00ab?\u00bb. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 Result \u0438 Option<\/a><\/p>\n<\/li>\n<li>\n<p><strong>6\u00a0\u043c\u0430\u044f<\/strong>\u00a0\u2014 <a href=\"https:\/\/otus.pw\/lasI\/\">\u041f\u0438\u0448\u0435\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430\u00a0Rust \u0441\u00a0\u043d\u0443\u043b\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><strong>22\u00a0\u043c\u0430\u044f<\/strong>\u00a0\u2014 <a href=\"https:\/\/otus.pw\/l1NM\/\">\u0417\u0430\u00a0\u0447\u0442\u043e\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043b\u044e\u0431\u044f\u0442 Rust<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/902584\/\"> https:\/\/habr.com\/ru\/articles\/902584\/<\/a><br \/><\/br><\/br><\/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-457672","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457672","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=457672"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457672\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}