{"id":467144,"date":"2025-07-16T09:00:37","date_gmt":"2025-07-16T09:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=467144"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=467144","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u0437\u0430\u0441\u0443\u043d\u0443\u043b\u0438 Git \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 (\u0438 \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u0441\u0442\u043e\u0438\u043b\u043e)<\/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! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u0448\u0430, \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a <a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">Gramax<\/a> \u2014 open source-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 Docs as Code.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043c\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 Git \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0438. \u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043e\u0442 IsomorphicGit \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 libgit2, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434 WebAssembly, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0437\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0435\u0440\u0435\u0440\u043e\u0436\u0434\u0430\u043b\u0441\u044f \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">Gramax<\/a>. \u041d\u0430\u043f\u043e\u043c\u043d\u044e,\u00a0Gramax \u2014 open source-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 Docs as Code. <\/p>\n<p>\u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 SSG \u043d\u0430 Next.js, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043b Markdown, \u0438 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e\u0435 Electron-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0435\u0441\u043e\u043c 600mb+. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Git \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a API-\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443 \u0434\u043e\u043a\u043f\u043e\u0440\u0442\u0430\u043b\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0432\u0448\u0435\u043c\u0443\u00a0<code>git pull<\/code>, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 VS Code \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445. <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u044f\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/strong>. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Markdown-\u0444\u0430\u0439\u043b\u044b \u0432 WYSIWYG-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0434\u0443\u043c\u0430\u043b\u0438 \u043e \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435<\/strong>. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435,  \u0431\u044b\u043b\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>. Docs as Code \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u043a\u0430\u043a \u0441 \u043a\u043e\u0434\u043e\u043c. \u041f\u043e\u0442\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Git: \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0439, \u043c\u0435\u0440\u0436 \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b \u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c.<\/strong>\u00a0\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u0433\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c: \u0432 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f Windows, macOS \u0438 Linux \u0438\u043b\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 Docs as Code \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Git \u0438 Markdown. \u041c\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u043b\u0438\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u0435\u0446\u043e\u0432. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Git \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u0430 \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0441\u0435 \u0435\u0449\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e <a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">Gramax<\/a>. \u0412 \u043d\u0438\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a\u0430\u044f \u0443 \u043d\u0430\u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0438 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0435.<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/gram_ax\/articles\/910716\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0442 Docs as Code \u043a Everything as Code: \u043a\u0430\u043a Gramax \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/gram_ax\/articles\/920350\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0443: Markdown, Git, CI\/CD \u0438 \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/a><\/p>\n<\/li>\n<\/ul>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>TL;DR: \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 IsomorphicGit, \u043d\u043e \u0432\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/petersalomonsen\/wasm-git\" rel=\"noopener noreferrer nofollow\">Proof-Of-Concept<\/a>\u00a0\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 libgit2 \u0432 WebAssembly, \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Emscripten \u2014 \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 C\/C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 WebAssembly, \u0434\u043b\u044f Rust \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u0440\u0433\u0435\u0442\u00a0<code>wasm32-unknown-emscripten<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u00a0<a href=\"https:\/\/emscripten.org\/docs\/api_reference\/Filesystem-API.html\" rel=\"noopener noreferrer nofollow\">WasmFS<\/a>\u00a0\u043e\u0442 Emscripten, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 OPFS. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 WebAssembly-\u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438\u00a0<code>bulk-memory<\/code>\u00a0\u0438\u00a0<code>atomics<\/code>. \u042d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 std \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u043b\u0430\u0433\u0430\u00a0<code>-Zbuild-std<\/code>\u00a0\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 nightly-\u0442\u0443\u043b\u0447\u0435\u0439\u043d.<\/p>\n<\/li>\n<li>\n<p>Git-\u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 CORS-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CORS-\u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 HTTP-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 libgit2 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0437 PoC, \u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u043b\u043b\u0431\u0435\u043a \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Git \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JS<\/h2>\n<p>\u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0438 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e Git. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IsomorphicGit \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e Git \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JavaScript, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0440\u044f\u0434\u043e\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u043e\u0435 API<\/strong>. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439, \u0430 API \u2014 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/strong>. IsomorphicGit \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0431\u0440\u0438 \u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u0443\u0447\u0435\u043d\u0438\u0435. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e IsomorphicGit \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0442\u043e\u043a \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0451\u043d. \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u0430\u043c\u0438 \u2014 \u0432 \u044d\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/isomorphic-git\/isomorphic-git\/pull\/1836\" rel=\"noopener noreferrer nofollow\">Pull Request<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e<\/strong>.\u00a0\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 IsomorphicGit \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0441\u043f\u0435\u0448\u043d\u043e. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0446\u0438\u0444\u0440 \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443, \u043d\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u043b\u0441\u044f <code>git.log<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430<\/strong>. \u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 IsomorphicGit \u043e\u0442\u0434\u0430\u043d\u0430 \u043d\u0430 \u043e\u0442\u043a\u0443\u043f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443, \u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0440 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 \u043b\u0438\u0448\u044c \u043f\u0430\u0440\u0443 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0430 Issue \u0438 \u0441\u043c\u043e\u0442\u0440\u044f\u0442 PR.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041a\u0430\u043a \u043c\u044b \u043f\u0440\u0438\u0448\u043b\u0438 \u043a WebAssembly \u0438 libgit2<\/h2>\n<p>\u041c\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e IsomorphicGit \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432 ~10k \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>\u041c\u044b \u0438\u0441\u043a\u0430\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e \u0431\u044b \u0434\u043b\u044f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u0434\u043e\u043a\u043f\u043e\u0440\u0442\u0430\u043b\u0430. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430\u00a0<a href=\"https:\/\/github.com\/petersalomonsen\/wasm-git\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 Proof-Of-Concept<\/a>, \u0433\u0434\u0435 libgit2 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 WebAssembly \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Emscripten. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e, \u0447\u0442\u043e libgit2 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 libgit2 \u2014 \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0432\u0448\u0430\u044f \u0441\u0435\u0431\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Git \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0430 \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u043c \u043b\u0443\u0447\u0448\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f libgit2 \u0432 WebAssembly \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Emscripten<\/h2>\n<p>Emscripten \u2014 \u044d\u0442\u043e \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 C\/C++ \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 WebAssembly. \u041d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 LLVM \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430, \u043e\u043d \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>Rust \u2014 \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u043e\u0439 \u044f\u0437\u044b\u043a \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u0430\u0440\u0433\u0435\u0442\u00a0<code>wasm32-unknown-emscripten<\/code>. \u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c git2-rs \u0438 libgit2 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438, \u0432 \u0446\u0435\u043b\u043e\u043c, \u0432\u0441\u0451 \u043f\u0440\u043e\u0448\u043b\u043e \u043b\u0435\u0433\u043a\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0442\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0434\u0430\u043b\u0438\u043b\u0438<\/strong>\u00a0<code>zlib-sys<\/code>\u00a0<strong>\u0438\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f WebAssembly-\u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432<\/strong>. (<a href=\"https:\/\/github.com\/pashokitsme\/git2-rs\/compare\/master..lib#diff-8cb577f4fdc3f5143f9bf88077a021e522ff4ed39dedc009ef37bd451cda7e29R27-R28\" rel=\"noopener noreferrer nofollow\">ref<\/a>) Emscripten \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e zlib \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0444\u043b\u0430\u0433\u0430\u00a0<code>-sUSE_ZLIB=1<\/code>. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043e\u0431\u043e\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0435\u0442\u044c\u044e.<\/strong>\u00a0(<a href=\"https:\/\/github.com\/pashokitsme\/git2-rs\/compare\/master..lib#diff-a47103f5ffeb9ec422f9ec9df7b22d8da3450b1a0df531d20a43bc4265dc1c85R169-R173\" rel=\"noopener noreferrer nofollow\">ref<\/a>) \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 HTTP-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442, \u0432\u0437\u044f\u0432 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u043e\u0434 \u0438\u0437 PoC. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e libgit2 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u0435\u0442\u044c\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0440\u0435\u0437\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 HTTP-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 libgit2.<\/strong>\u00a0(<a href=\"https:\/\/github.com\/pashokitsme\/git2-rs\/compare\/master..lib#diff-a47103f5ffeb9ec422f9ec9df7b22d8da3450b1a0df531d20a43bc4265dc1c85L95-R133\" rel=\"noopener noreferrer nofollow\">ref<\/a>) \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 WebAssembly, \u0442\u0430\u043a \u043e\u043d\u0430 \u0435\u0449\u0451 \u0438 \u043c\u0435\u0448\u0430\u043b\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u00a0<code>libgit2\/src\/libgit2\/transports\/http.c<\/code>\u00a0\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 Rust? \u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u044b\u043c) \u043d\u0430 <a href=\"https:\/\/tauri.app\/\" rel=\"noopener noreferrer nofollow\">Tauri v2<\/a> \u0438 \u043d\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0448\u0430\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u0434\u0430 \u0438 \u0432 C\/C++ \u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u043e\u0440\u0435\u043b \u0436\u0435\u043b\u0430\u043d\u0438\u0435\u043c.<\/p>\n<h3>\u0427\u0435\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f WebAssembly<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Rust \u0432 WebAssembly \u2014 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0430\u0440\u0433\u0435\u0442\u0430\u00a0<code>wasm32-unknown-unknown<\/code>\u00a0(<a href=\"https:\/\/doc.rust-lang.org\/nightly\/rustc\/platform-support\/wasm32-unknown-unknown.html\" rel=\"noopener noreferrer nofollow\">ref<\/a>). \u041e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u00a0<code>std::fs<\/code>\u00a0\u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e C-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u043a libc.<\/p>\n<p>Emscripten \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0441\u0440\u0435\u0434\u0435 WebAssembly. \u041e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 libc, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h2>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 OPFS<\/h2>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Emscripten \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 in-memory \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0442\u0435\u0438, \u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432.<\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<a href=\"https:\/\/github.com\/isomorphic-git\/lightning-fs\" rel=\"noopener noreferrer nofollow\">lightning-fs<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 IndexedDB \u2014 \u044d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0441 libgit2 \u0435\u0451 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Emscripten. \u041e\u043d \u0442\u043e\u0436\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u044d\u043a\u0435\u043d\u0434 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 IndexedDB \u0438 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c\u00a0<em>\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/em>\u00a0\u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 lightning-fs.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430\u00a0<a href=\"https:\/\/emscripten.org\/docs\/api_reference\/Filesystem-API.html\" rel=\"noopener noreferrer nofollow\">WasmFS \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c OPFS<\/a>\u00a0(Origin Private File System) \u2014 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e (\u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442) \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0442 Emscripten. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0451 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u043b\u0430\u0433\u0438\u00a0<code>-sWASMFS=1<\/code>\u00a0\u0438\u00a0<code>-pthreads<\/code>\u00a0\u0432 emcc.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 WasmFS<\/h3>\n<p>\u0424\u043b\u0430\u0433\u00a0<code>-pthreads<\/code>\u00a0\u0432\u044b\u0437\u0432\u0430\u043b \u0446\u0435\u043b\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u043c \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u2014 \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0430 \u043b\u0438\u043d\u043a\u0435\u0440 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>wasm-ld: error: --shared-memory is disallowed by   ...\/release\/deps\/gramax_wasm.gramax_wasm.75e384114fc643b7-cgu.0.rcgu.o   because it was not compiled with 'atomics' or 'bulk-memory' features.<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438\u00a0<code>-Ctarget-feature=+atomics,+bulk-memory<\/code>, \u043d\u043e \u044d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043d\u0430\u0441:<\/p>\n<ul>\n<li>\n<p><strong>\u041e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 pre-compiled std<\/strong>. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Rust \u043b\u0438\u043d\u043a\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043d\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u044d\u0442\u0438\u0445 \u0444\u0438\u0447 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0435\u0451 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c. \u0424\u043b\u0430\u0433\u00a0<code>-Zbuild-std<\/code>\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 nightly-\u0442\u0443\u043b\u0447\u0435\u0439\u043d<\/strong>. \u0424\u043b\u0430\u0433\u00a0<code>-ZBuild-std<\/code>\u00a0\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0438 rustc \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 stable-\u0432\u0435\u0442\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u0434-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f libgit2<\/strong>. \u0421\u0430\u043c libgit2 \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c\u0438 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c \u0431\u0438\u043b\u0434-\u0441\u043a\u0440\u0438\u043f\u0442 git2-rs \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 libgit2. \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u043b\u0430\u0433\u0438\u00a0\u00a0<code>-matomics<\/code>\u00a0\u0438\u00a0<code>-mbulk-memory<\/code>\u00a0\u0434\u043b\u044f WebAssembly-\u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432.<\/p>\n<pre><code class=\"rust\">if target.contains(\"wasm\") {   cfg.flag(\"-matomics\").flag(\"-mbulk-memory\"); }<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043c\u0435\u0440\u044b \u0431\u044b\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438<a href=\"https:\/\/emscripten.org\/docs\/porting\/pthreads.html\" rel=\"noopener noreferrer nofollow\">\u00a0\u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/a>\u00a0\u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u00a0<code>-pthreads<\/code>\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u043d. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u043f\u0430\u043c\u044f\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0448\u0430\u0440\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/SharedArrayBuffer\" rel=\"noopener noreferrer nofollow\">SharedArrayBuffer<\/a>, \u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a.<\/p>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 SharedArrayBuffer \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c:<\/p>\n<pre><code>Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp<\/code><\/pre>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u044f\u0432\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e:<\/p>\n<blockquote>\n<p>To use shared memory your document must be in a\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Secure_Contexts\" rel=\"noopener noreferrer nofollow\">secure context<\/a>\u00a0and\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/crossOriginIsolated\" rel=\"noopener noreferrer nofollow\">cross-origin isolated<\/a>.<\/p>\n<\/blockquote>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442\u0441\u044f iframe \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438\u043b\u0438 YouTube Embed, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443. \u0412 chromium-based \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/IFrame_credentialless\" rel=\"noopener noreferrer nofollow\">\u0430\u0442\u0440\u0438\u0431\u0443\u0442 credentialless<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 iframe\u2019\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 Firefox \u0438 Safari \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043f\u043e CORS<\/h2>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 CORS-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a Git-\u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, GitHub \u0438\u043b\u0438 GitLab). \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 PoC \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0437 \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 CORS-\u043f\u0440\u043e\u043a\u0441\u0438 \u043e\u0442 IsomorphicGit. \u041e\u043d\u0438 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u043a\u043e\u043b\u043b\u0431\u0435\u043a \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0435\u0433\u043e \u043e\u0442\u043c\u0435\u043d\u044b.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u0439 \u0441\u0432\u044f\u0437\u043a\u0435, libgit2 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 \u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u043b \u0447\u0442\u043e-\u0442\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435\u00a0<code>bad packet length<\/code>. \u041c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0442\u0432\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u0430\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435: \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435\u00a0<a href=\"https:\/\/github.com\/Gram-ax\/gramax\/blob\/master\/apps\/browser\/crates\/gramax-wasm\/js\/post.ts#L20-L46\" rel=\"noopener noreferrer nofollow\">JS \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 Rust-\u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e HTTP-\u043e\u0448\u0438\u0431\u043a\u0443. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u0444\u0435\u0442\u0447\u0430), \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u00a0<a href=\"https:\/\/github.com\/Gram-ax\/gramax\/blob\/master\/apps\/browser\/crates\/gramax-wasm\/src\/git_http_error.rs#L19-L53\" rel=\"noopener noreferrer nofollow\">\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a>.<\/p>\n<h2>\u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 WebAssembly \u0438\u0437 JS<\/h2>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Rust \u0432 WebAssembly \u2014\u00a0<code>wasm32-unknown-unknown<\/code>. \u041e\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u0435\u0439\u0442\u043e\u043c\u00a0<code>wasm-bindgen<\/code>\u00a0(<a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\" rel=\"noopener noreferrer nofollow\">ref<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0438 JS &lt;-&gt; Rust. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0449\u0451 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 Rust, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0434\u043b\u044f Emscripten, \u043d\u043e \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0438 \u2014 \u0441\u0430\u043c\u043e\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0435.<\/p>\n<p>\u0423 Emscripten \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043e\u043d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441 \u0433\u043e\u043b\u044b\u043c FFI. \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0422\u0443\u0442 \u0437\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0437\u044f\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u044b:<\/p>\n<pre><code class=\"rust\">#[no_mangle] \/\/ \u0410\u0442\u0440\u0438\u0431\u0443\u0442 #[no_mangle] \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 pub unsafe extern \"C\" fn set_last_http_error(status: u16, body: *mut u8, body_len: usize) {   let body = Vec::from_raw_parts(body, body_len, body_len);   let body_str = String::from_utf8_lossy(&amp;body);    \/\/ \u0427\u0430\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0443; \u041e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b   LAST_HTTP_ERROR.with(move |err| {     info!(target: TAG, \"set last_http_error: code: {}; message:\\n{}\", status, body_str);     err.lock().unwrap().replace(LastHttpError { status, res: body_str.to_string() });   }) }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u00a0<code>body<\/code>\u00a0\u0438 \u0435\u0433\u043e \u0434\u043b\u0438\u043d\u0430. \u042d\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043f\u043e\u0434 \u0441\u043e\u0431\u043e\u0439, \u0447\u0442\u043e \u0432 WebAssembly-\u043c\u043e\u0434\u0443\u043b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b JS. \u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"typescript\">const setLastHttpError = async (status: number, body: string) =&gt; { const [bodyLen, bodyPtr] = await str2ptr(body); const fn = Module[\"_set_last_http_error\"]; await fn(status, bodyPtr, bodyLen); };<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<code>str2ptr<\/code>\u00a0\u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c JS-\u0441\u0442\u0440\u043e\u043a\u0438 \u0432 C-\u0441\u0442\u0440\u043e\u043a\u0443, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"typescript\">const encoder = new TextEncoder();  export const alloc = async (buffer: Uint8Array): Promise&lt;number&gt; =&gt; { const ptr = await self.wasm._ralloc(buffer.byteLength); const mem = new Uint8Array(self.wasm.wasmMemory.buffer); mem.set(buffer, ptr); return ptr; };  export const str2ptr = async (s: string): Promise&lt;[number, number]&gt; =&gt; { const s_bytes = encoder.encode(s); const s_ptr = await alloc(s_bytes); return [s_bytes.byteLength, s_ptr]; };<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<code>_ralloc<\/code>\u00a0\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Rust. \u041e\u043d\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 WebAssembly.<\/p>\n<pre><code class=\"rust\">#[no_mangle] pub unsafe extern \"C\" fn ralloc(len: usize) -&gt; *mut u8 {   std::alloc::alloc(Layout::from_size_align_unchecked(len, 4)) }  #[no_mangle] pub unsafe extern \"C\" fn rfree(ptr: *mut c_void, len: usize) {   std::alloc::dealloc(ptr.cast(), Layout::from_size_align_unchecked(len, 4)); }<\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u043e\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u2014 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0444\u043b\u0430\u0433\u0435\u00a0<code>-sEXPORTED_FUNCTIONS=fn1,fn2<\/code>\u00a0\u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u0437 JS, \u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u00a0<code>_<\/code>.<\/p>\n<h3>\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0431\u043e\u0439\u043b\u0435\u0440\u043f\u043b\u0435\u0439\u0442-\u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 WebAssembly-\u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h3>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c, \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043b\u0438\u0448\u044c \u043f\u0430\u0440\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430\u043c\u0438. \u041d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0418 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Emscripten \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u00a0<code>wasm-bindgen<\/code>, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0430\u043a\u0440\u043e\u0441, \u0443\u043c\u0435\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430\u043c\u0438, \u0432 FFI-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0442\u0430\u043a (\u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0437\u044f\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<code>diff<\/code>, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0435\u0451 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b):<\/p>\n<pre><code class=\"rust\">#[derive(Deserialize, Serialize, Debug)] #[serde(rename_all = \"camelCase\")] pub struct DiffConfig {   #[serde(default)]   pub compare: DiffCompareOptions,   #[serde(default = \"default_use_merge_base\")]   pub use_merge_base: bool,   pub renames: bool, }  #[derive(Serialize, Debug)] #[serde(rename_all = \"camelCase\")] pub struct DiffTree2TreeInfo {   pub has_changes: bool,   pub added: usize,   pub deleted: usize,   pub files: Vec&lt;DiffTree2TreeFile&gt;, }  \/\/ ---   #[em_bindgen(json)] pub fn diff(repo_path: String, opts: DiffConfig) -&gt; Result&lt;DiffTree2TreeInfo&gt; {   git::diff(Path::new(&amp;repo_path), opts) \/\/ \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441 git - \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043b\u0438\u0431\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 git; \u043d\u0435 git2-rs \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0435 }<\/code><\/pre>\n<pre><code class=\"typescript\">export type DiffConfig = { compare: DiffCompareOptions; renames: boolean; useMergeBase?: boolean; };  export type DiffTree2TreeInfo = { hasChanges: boolean; added: number; deleted: number; files: DiffTree2TreeFile[]; };  export const diff = (args: Args &amp; { opts: DiffConfig }) =&gt; call&lt;DiffTree2TreeInfo&gt;(\"diff\", args);<\/code><\/pre>\n<p>\u0412 \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Rust.<\/strong>\u00a0(<a href=\"https:\/\/github.com\/Gram-ax\/gramax\/blob\/master\/apps\/browser\/crates\/em-bindgen-macro\/src\/lib.rs#L167\" rel=\"noopener noreferrer nofollow\">ref<\/a>) \u041c\u0430\u043a\u0440\u043e\u0441\u00a0<code>#[em_bindgen]<\/code>\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 FFI-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e. \u0415\u0441\u043b\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 C-\u0441\u0442\u0438\u043b\u0435, \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:\u00a0<code>size_t fn(size_t len, const uint8_t* ptr);<\/code><\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043e JSON-\u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0435\u0451 \u0434\u043b\u0438\u043d\u0443. \u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u043a \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u043f\u043e \u0435\u0451 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433.<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442, \u043b\u0438\u0431\u043e \u043a\u0430\u043a JSON.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b JS.<\/strong>\u00a0(<a href=\"https:\/\/github.com\/Gram-ax\/gramax\/blob\/master\/app\/resolveModule\/gitcall\/wasm.ts\" rel=\"noopener noreferrer nofollow\">ref<\/a>) \u0424\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<code>call<\/code>\u00a0\u0440\u0430\u0437\u043d\u0430\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b (\u0432\u0435\u0431, \u0434\u0435\u0441\u043a\u0442\u043e\u043f \u0438\u043b\u0438 \u0434\u043e\u043a\u043f\u043e\u0440\u0442\u0430\u043b). \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 JSON-\u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c WebAssembly-\u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<\/ol>\n<h2>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u043f\u0443\u043b\u0443 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432 WebAssembly<\/h2>\n<p>WebAssembly-\u043c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440\u0435 (\u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u043c), \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0440\u043e\u0441\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043e\u043d \u0441\u0442\u0430\u043b \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438\u00a0<code>-pthreads<\/code>\u00a0\u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432-\u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u0433\u0434\u0435 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0434\u0430\u0447, \u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u2014 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043f\u0443\u043b\u0430.<\/p>\n<pre><code class=\"rust\">static THREAD_POOL: LazyLock&lt;ThreadPool&gt; =   LazyLock::new(|| threadpool::Builder::new().num_threads(7).build());  static ATOMIC_CALLBACK_ID_COUNTER: AtomicUsize = AtomicUsize::new(0);  pub type JobCallbackId = usize;  pub fn run&lt;F: FnOnce() -&gt; Buffer + Send + Sync + 'static&gt;(job: F) -&gt; JobCallbackId {   let callback_id = ATOMIC_CALLBACK_ID_COUNTER.fetch_add(1, Ordering::SeqCst);    THREAD_POOL.execute(move || {     let buffer = job();     on_done(callback_id, buffer)   });    callback_id }  fn on_done(callback_id: usize, buffer: Buffer) {   unsafe {     let ptr = buffer.boxed();     let script = format!(\"self.postMessage({{ callbackId: {}, ptr: {} }})\", callback_id, ptr as usize);     let script_cstr = CString::new(script).unwrap().into_raw().cast::&lt;u8&gt;();     crate::ffi::emscripten_run_script(script_cstr);   } }<\/code><\/pre>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Rust \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0439 \u2014\u00a0<code>#[em_bindgen]<\/code>\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"rust\">#[serde(rename_all = \"camelCase\")] struct DiffArgs {     repo_path: String,     opts: DiffConfig, }  #[no_mangle] unsafe extern \"C\" fn diff(len: usize, ptr: *const u8) -&gt; JobCallbackId {     let send_ptr = ptr as usize;     crate::threading::run(move || {         let ptr = send_ptr as *mut u8;         let raw_data = Vec::from_raw_parts(ptr, len, len);         match serde_json::from_slice::&lt;DiffArgs&gt;(&amp;raw_data) {             Ok(args) =&gt; {                 let DiffArgs { repo_path, opts } = args;                 let res: Result&lt;DiffTree2TreeInfo&gt; = {                     git::diff(Path::new(&amp;repo_path), opts)                 };                 let bytes = match res {                     Ok(res) =&gt; Ok(serde_json::to_vec(&amp;res).expect(\"unable to serialize\")),                     Err(err) =&gt; Err(err),                 };                 crate::Buffer::from(bytes)             }             Err(err) =&gt; {                 let res = Err(err.to_string());                 let bytes = match res {                     Ok(res) =&gt; {                         Ok(serde_json::to_vec::&lt;String&gt;(&amp;res).expect(\"unable to serialize\"))                     }                     Err(err) =&gt; Err(err),                 };                 crate::Buffer::from(bytes)             }         }     }) }<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b JS \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0430\u0442\u0447\u0438\u0442\u044c JS-\u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u00a0<code>postMessage<\/code>\u00a0\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u043b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440 (\u0442\u0430\u043a\u0436\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b JS) \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0440\u0443\u0431\u043e \u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Emscripten \u0438\u043d\u043e\u0433\u0434\u0430 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u2014 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0435\u0451 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043b\u043b\u0431\u0435\u043a\u0430 \u0432\u00a0<code>callbacks<\/code>.<\/p>\n<pre><code class=\"typescript\">const callbacks: { [id: number]: WasmCallback } = {};  self.addEventListener(\"message\", async (ev) =&gt; { if (ev.data.type == \"git-call\") { const id = await callGit(ev.data.command, ev.data.args); callbacks[id] = { callbackId: ev.data.callbackId, command: ev.data.command, type: ev.data.type }; return; } });<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00a0<code>on_done<\/code>\u00a0\u0438\u0437 Rust-\u043a\u043e\u0434\u0430 \u2014 \u043e\u043d \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043f\u0430\u0440\u0441\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043d\u0430\u0437\u0430\u0434 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u042d\u0442\u043e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0437\u043e\u043b\u0432\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u043c\u0438\u0441\u0430.<\/p>\n<pre><code class=\"typescript\">self.on_done = (innerCallbackId: number, ptr: number) =&gt; { const { command, callbackId, type } = callbacks[innerCallbackId] || {}; delete callbacks[innerCallbackId]; if (!command) return;  const str_res = ptr2str(ptr); if (!str_res) { self.postMessage({ type, callbackId, ok: false, res: null }); return; }  return self.postMessage({ type, callbackId, ok: str_res.ok, res: str_res.buf ? JSON.parse(str_res.buf) : null, }); };<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438. \u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 IsomorphicGit, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 libgit2, \u043a\u0430\u043a \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0442\u0430\u043a \u0438 \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445 Gramax. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/854\/a82\/872\/854a8287212b101d6a948f0574bb2ba4.gif\" width=\"1024\" height=\"279\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/854\/a82\/872\/854a8287212b101d6a948f0574bb2ba4.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/854\/a82\/872\/854a8287212b101d6a948f0574bb2ba4.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u044e\u0431\u043e\u0435 git-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 GitLab.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/771\/6bf\/ba5\/7716bfba55533790cf03e38a369bb83c.png\" width=\"3000\" height=\"1836\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/771\/6bf\/ba5\/7716bfba55533790cf03e38a369bb83c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/771\/6bf\/ba5\/7716bfba55533790cf03e38a369bb83c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<\/li>\n<li>\n<p>\u0412\u043d\u043e\u0441\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u00ab\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c\u00bb \u2014 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0438 \u043f\u0443\u0448.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/185\/8e2\/ebe\/1858e2ebeeaed47632c577777ed2d1be.png\" width=\"3000\" height=\"1836\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/185\/8e2\/ebe\/1858e2ebeeaed47632c577777ed2d1be.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/185\/8e2\/ebe\/1858e2ebeeaed47632c577777ed2d1be.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<\/li>\n<li>\n<p>\u041d\u0430\u0436\u0438\u043c\u0435\u0442 \u00ab\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb \u2014 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0443\u043b\u043b.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0432 Gramax \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043f\u043e\u0440\u0442\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Tauri \u043f\u043e\u0434 Windows, macOS \u0438 Linux. \u0422\u0430\u043c \u0442\u043e\u0436\u0435 \u0432\u0441\u0435 \u043d\u0435 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/p>\n<h3>\u041e\u0442\u043a\u0440\u044b\u0442\u043e, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0438 \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c<\/h3>\n<ul>\n<li>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u2014\u00a0<a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">https:\/\/gram.ax<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u00a0<a href=\"https:\/\/github.com\/Gram-ax\/gramax\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/gitverse.ru\/gramax\/gramax\" rel=\"noopener noreferrer nofollow\">GitVerse<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0442\u0443\u043f\u0430\u0439\u0442\u0435 \u0432 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u2014\u00a0<a href=\"https:\/\/t.me\/gramax_chat\" rel=\"noopener noreferrer nofollow\">https:\/\/t.me\/gramax_chat<\/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\/928144\/\"> https:\/\/habr.com\/ru\/articles\/928144\/<\/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! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u0448\u0430, \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a <a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">Gramax<\/a> \u2014 open source-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 Docs as Code.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043c\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 Git \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0438. \u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043e\u0442 IsomorphicGit \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 libgit2, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434 WebAssembly, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0437\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0435\u0440\u0435\u0440\u043e\u0436\u0434\u0430\u043b\u0441\u044f \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">Gramax<\/a>. \u041d\u0430\u043f\u043e\u043c\u043d\u044e,\u00a0Gramax \u2014 open source-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 Docs as Code. <\/p>\n<p>\u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 SSG \u043d\u0430 Next.js, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043b Markdown, \u0438 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e\u0435 Electron-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0435\u0441\u043e\u043c 600mb+. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Git \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a API-\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443 \u0434\u043e\u043a\u043f\u043e\u0440\u0442\u0430\u043b\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0432\u0448\u0435\u043c\u0443\u00a0<code>git pull<\/code>, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 VS Code \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445. <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u044f\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/strong>. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Markdown-\u0444\u0430\u0439\u043b\u044b \u0432 WYSIWYG-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0434\u0443\u043c\u0430\u043b\u0438 \u043e \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435<\/strong>. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435,  \u0431\u044b\u043b\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>. Docs as Code \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u043a\u0430\u043a \u0441 \u043a\u043e\u0434\u043e\u043c. \u041f\u043e\u0442\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Git: \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0439, \u043c\u0435\u0440\u0436 \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b \u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c.<\/strong>\u00a0\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u0433\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c: \u0432 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f Windows, macOS \u0438 Linux \u0438\u043b\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 Docs as Code \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Git \u0438 Markdown. \u041c\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u043b\u0438\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u0435\u0446\u043e\u0432. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Git \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u0430 \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0441\u0435 \u0435\u0449\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e <a href=\"https:\/\/gram.ax\/ru?utm_source=habr-libgit2\" rel=\"noopener noreferrer nofollow\">Gramax<\/a>. \u0412 \u043d\u0438\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a\u0430\u044f \u0443 \u043d\u0430\u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0438 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0435.<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/gram_ax\/articles\/910716\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0442 Docs as Code \u043a Everything as Code: \u043a\u0430\u043a Gramax \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/gram_ax\/articles\/920350\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0443: Markdown, Git, CI\/CD \u0438 \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/a><\/p>\n<\/li>\n<\/ul>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>TL;DR: \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 IsomorphicGit, \u043d\u043e \u0432\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/petersalomonsen\/wasm-git\" rel=\"noopener noreferrer nofollow\">Proof-Of-Concept<\/a>\u00a0\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 libgit2 \u0432 WebAssembly, \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Emscripten \u2014 \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 C\/C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 WebAssembly, \u0434\u043b\u044f Rust \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u0440\u0433\u0435\u0442\u00a0<code>wasm32-unknown-emscripten<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u00a0<a href=\"https:\/\/emscripten.org\/docs\/api_reference\/Filesystem-API.html\" rel=\"noopener noreferrer nofollow\">WasmFS<\/a>\u00a0\u043e\u0442 Emscripten, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 OPFS. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 WebAssembly-\u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438\u00a0<code>bulk-memory<\/code>\u00a0\u0438\u00a0<code>atomics<\/code>. \u042d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 std \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u043b\u0430\u0433\u0430\u00a0<code>-Zbuild-std<\/code>\u00a0\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 nightly-\u0442\u0443\u043b\u0447\u0435\u0439\u043d.<\/p>\n<\/li>\n<li>\n<p>Git-\u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 CORS-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CORS-\u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 HTTP-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 libgit2 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0437 PoC, \u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u043b\u043b\u0431\u0435\u043a \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Git \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JS<\/h2>\n<p>\u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0438 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e Git. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IsomorphicGit \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e Git \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JavaScript, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0440\u044f\u0434\u043e\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u043e\u0435 API<\/strong>. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439, \u0430 API \u2014 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/strong>. IsomorphicGit \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0431\u0440\u0438 \u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u0443\u0447\u0435\u043d\u0438\u0435. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e IsomorphicGit \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0442\u043e\u043a \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0451\u043d. \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u0430\u043c\u0438 \u2014 \u0432 \u044d\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/isomorphic-git\/isomorphic-git\/pull\/1836\" rel=\"noopener noreferrer nofollow\">Pull Request<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e<\/strong>.\u00a0\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 IsomorphicGit \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0441\u043f\u0435\u0448\u043d\u043e. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0446\u0438\u0444\u0440 \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443, \u043d\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u043b\u0441\u044f <code>git.log<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430<\/strong>. \u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 IsomorphicGit \u043e\u0442\u0434\u0430\u043d\u0430 \u043d\u0430 \u043e\u0442\u043a\u0443\u043f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443, \u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0440 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 \u043b\u0438\u0448\u044c \u043f\u0430\u0440\u0443 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0430 Issue \u0438 \u0441\u043c\u043e\u0442\u0440\u044f\u0442 PR.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041a\u0430\u043a \u043c\u044b \u043f\u0440\u0438\u0448\u043b\u0438 \u043a WebAssembly \u0438 libgit2<\/h2>\n<p>\u041c\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e IsomorphicGit \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432 ~10k \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>\u041c\u044b \u0438\u0441\u043a\u0430\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e \u0431\u044b \u0434\u043b\u044f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u0434\u043e\u043a\u043f\u043e\u0440\u0442\u0430\u043b\u0430. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430\u00a0<a href=\"https:\/\/github.com\/petersalomonsen\/wasm-git\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 Proof-Of-Concept<\/a>, \u0433\u0434\u0435 libgit2 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 WebAssembly \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Emscripten. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e, \u0447\u0442\u043e libgit2 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 libgit2 \u2014 \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0432\u0448\u0430\u044f \u0441\u0435\u0431\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Git \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0430 \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u043c \u043b\u0443\u0447\u0448\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f libgit2 \u0432 WebAssembly \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Emscripten<\/h2>\n<p>Emscripten \u2014 \u044d\u0442\u043e \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 C\/C++ \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 WebAssembly. \u041d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 LLVM \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430, \u043e\u043d \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>Rust \u2014 \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u043e\u0439 \u044f\u0437\u044b\u043a \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u0430\u0440\u0433\u0435\u0442\u00a0<code>wasm32-unknown-emscripten<\/code>. \u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c git2-rs \u0438 libgit2 \u0432\u043c\u0435\u0441\u0442\u0435 \u0438, \u0432 \u0446\u0435\u043b\u043e\u043c, \u0432\u0441\u0451 \u043f\u0440\u043e\u0448\u043b\u043e \u043b\u0435\u0433\u043a\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0442\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0434\u0430\u043b\u0438\u043b\u0438<\/strong>\u00a0<code>zlib-sys<\/code>\u00a0<strong>\u0438\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f WebAssembly-\u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432<\/strong>. (<a href=\"https:\/\/github.com\/pashokitsme\/git2-rs\/compare\/master..lib#diff-8cb577f4fdc3f5143f9bf88077a021e522ff4ed39dedc009ef37bd451cda7e29R27-R28\" rel=\"noopener noreferrer nofollow\">ref<\/a>) Emscripten \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e zlib \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0444\u043b\u0430\u0433\u0430\u00a0<code>-sUSE_ZLIB=1<\/code>. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043e\u0431\u043e\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0435\u0442\u044c\u044e.<\/strong>\u00a0(<a href=\"https:\/\/github.com\/pashokitsme\/git2-rs\/compare\/master..lib#diff-a47103f5ffeb9ec422f9ec9df7b22d8da3450b1a0df531d20a43bc4265dc1c85R169-R173\" rel=\"noopener noreferrer nofollow\">ref<\/a>) \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 HTTP-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442, \u0432\u0437\u044f\u0432 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u043e\u0434 \u0438\u0437 PoC. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e libgit2 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u0435\u0442\u044c\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0440\u0435\u0437\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 HTTP-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 libgit2.<\/strong>\u00a0(<a href=\"https:\/\/github.com\/pashokitsme\/git2-rs\/compare\/master..lib#diff-a47103f5ffeb9ec422f9ec9df7b22d8da3450b1a0df531d20a43bc4265dc1c85L95-R133\" rel=\"noopener noreferrer nofollow\">ref<\/a>) \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 WebAssembly, \u0442\u0430\u043a \u043e\u043d\u0430 \u0435\u0449\u0451 \u0438 \u043c\u0435\u0448\u0430\u043b\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u00a0<code>libgit2\/src\/libgit2\/transports\/http.c<\/code>\u00a0\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 Rust? \u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u044b\u043c) \u043d\u0430 <a href=\"https:\/\/tauri.app\/\" rel=\"noopener noreferrer nofollow\">Tauri v2<\/a> \u0438 \u043d\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0448\u0430\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u0434\u0430 \u0438 \u0432 C\/C++ \u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u043e\u0440\u0435\u043b \u0436\u0435\u043b\u0430\u043d\u0438\u0435\u043c.<\/p>\n<h3>\u0427\u0435\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f WebAssembly<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Rust \u0432 WebAssembly \u2014 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0430\u0440\u0433\u0435\u0442\u0430\u00a0<code>wasm32-unknown-unknown<\/code>\u00a0(<a href=\"https:\/\/doc.rust-lang.org\/nightly\/rustc\/platform-support\/wasm32-unknown-unknown.html\" rel=\"noopener noreferrer nofollow\">ref<\/a>). \u041e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u00a0<code>std::fs<\/code>\u00a0\u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e C-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u043a libc.<\/p>\n<p>Emscripten \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0441\u0440\u0435\u0434\u0435 WebAssembly. \u041e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 libc, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h2>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 OPFS<\/h2>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Emscripten \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 in-memory \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0442\u0435\u0438, \u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432.<\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<a href=\"https:\/\/github.com\/isomorphic-git\/lightning-fs\" rel=\"noopener noreferrer nofollow\">lightning-fs<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 IndexedDB \u2014 \u044d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0441 libgit2 \u0435\u0451 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Emscripten. \u041e\u043d \u0442\u043e\u0436\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u044d\u043a\u0435\u043d\u0434 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 IndexedDB \u0438 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c\u00a0<em>\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/em>\u00a0\u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 lightning-fs.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430\u00a0<a href=\"https:\/\/emscripten.org\/docs\/api_reference\/Filesystem-API.html\" rel=\"noopener noreferrer nofollow\">WasmFS \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c OPFS<\/a>\u00a0(Origin Private File System) \u2014 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e (\u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442) \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0442 Emscripten. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0451 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u043b\u0430\u0433\u0438\u00a0<code>-sWASMFS=1<\/code>\u00a0\u0438\u00a0<code>-pthreads<\/code>\u00a0\u0432 emcc.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 WasmFS<\/h3>\n<p>\u0424\u043b\u0430\u0433\u00a0<code>-pthreads<\/code>\u00a0\u0432\u044b\u0437\u0432\u0430\u043b \u0446\u0435\u043b\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u043c \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u2014 \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0430 \u043b\u0438\u043d\u043a\u0435\u0440 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>wasm-ld: error: --shared-memory is disallowed by   ...\/release\/deps\/gramax_wasm.gramax_wasm.75e384114fc643b7-cgu.0.rcgu.o   because it was not compiled with 'atomics' or 'bulk-memory' features.<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438\u00a0<code>-Ctarget-feature=+atomics,+bulk-memory<\/code>, \u043d\u043e \u044d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043d\u0430\u0441:<\/p>\n<ul>\n<li>\n<p><strong>\u041e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 pre-compiled std<\/strong>. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Rust \u043b\u0438\u043d\u043a\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043d\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u044d\u0442\u0438\u0445 \u0444\u0438\u0447 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0435\u0451 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c. \u0424\u043b\u0430\u0433\u00a0<code>-Zbuild-std<\/code>\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 nightly-\u0442\u0443\u043b\u0447\u0435\u0439\u043d<\/strong>. \u0424\u043b\u0430\u0433\u00a0<code>-ZBuild-std<\/code>\u00a0\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0438 rustc \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 stable-\u0432\u0435\u0442\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u0434-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f libgit2<\/strong>. \u0421\u0430\u043c libgit2 \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c\u0438 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c \u0431\u0438\u043b\u0434-\u0441\u043a\u0440\u0438\u043f\u0442 git2-rs \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 libgit2. \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u043b\u0430\u0433\u0438\u00a0\u00a0<code>-matomics<\/code>\u00a0\u0438\u00a0<code>-mbulk-memory<\/code>\u00a0\u0434\u043b\u044f WebAssembly-\u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432.<\/p>\n<pre><code class=\"rust\">if target.contains(\"wasm\") {   cfg.flag(\"-matomics\").flag(\"-mbulk-memory\"); }<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043c\u0435\u0440\u044b \u0431\u044b\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438<a href=\"https:\/\/emscripten.org\/docs\/porting\/pthreads.html\" rel=\"noopener noreferrer nofollow\">\u00a0\u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/a>\u00a0\u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u00a0<code>-pthreads<\/code>\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u043d. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u043f\u0430\u043c\u044f\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0448\u0430\u0440\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/SharedArrayBuffer\" rel=\"noopener noreferrer nofollow\">SharedArrayBuffer<\/a>, \u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a.<\/p>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 SharedArrayBuffer \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c:<\/p>\n<pre><code>Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp<\/code><\/pre>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u044f\u0432\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e:<\/p>\n<blockquote>\n<p>To use shared memory your document must be in a\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Secure_Contexts\" rel=\"noopener noreferrer nofollow\">secure context<\/a>\u00a0and\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/crossOriginIsolated\" rel=\"noopener noreferrer nofollow\">cross-origin isolated<\/a>.<\/p>\n<\/blockquote>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442\u0441\u044f iframe \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438\u043b\u0438 YouTube Embed, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443. \u0412 chromium-based \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/IFrame_credentialless\" rel=\"noopener noreferrer nofollow\">\u0430\u0442\u0440\u0438\u0431\u0443\u0442 credentialless<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 iframe\u2019\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 Firefox \u0438 Safari \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043f\u043e CORS<\/h2>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-467144","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467144","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=467144"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467144\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=467144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=467144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=467144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}