<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Rust on Shellj的博客</title>
    <link>https://im.shellj.com/tags/rust/</link>
    <description>Recent content in Rust on Shellj的博客</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 22 Jul 2024 10:01:41 +0800</lastBuildDate>
    <atom:link href="https://im.shellj.com/tags/rust/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Windows Rust 编译 mysqlclient 缺失或者 libpq 缺失解决方法</title>
      <link>https://im.shellj.com/posts/2021/11/windows-rust-compile-missing-mysqlclient/</link>
      <pubDate>Sat, 20 Nov 2021 21:29:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2021/11/windows-rust-compile-missing-mysqlclient/</guid>
      <description>&lt;p&gt;在 Windows 上使用 Rust 编译带有 Mysql 或者 Postgresql 的项目会报 &lt;code&gt;mysqlclient&lt;/code&gt; 或者 &lt;code&gt;libpq&lt;/code&gt; 缺失，使用下面的方法可以解决。&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;下载 &lt;a href=&#34;https://cdn.mysql.com/archives/mysql-connector-c/mysql-connector-c-6.1.11-winx64.zip&#34;&gt;mysql-connector-c&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;配置 CARGO_HOME\config，新增配置&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[target.x86_64-pc-windows-msvc.mysqlclient]&#xA;rustc-link-search = [&amp;#34;E:\\Env\\mysql\\mysql-connector-c-6.1.11-winx64\\lib\\vs14&amp;#34;]&#xA;rustc-link-lib = [&amp;#34;mysqlclient&amp;#34;]&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;如果是 posqgresql 则新增:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rust 开发环境配置</title>
      <link>https://im.shellj.com/posts/2019/09/rust-development-environment-setting/</link>
      <pubDate>Thu, 12 Sep 2019 13:59:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/09/rust-development-environment-setting/</guid>
      <description>&lt;h2 id=&#34;指定安装位置&#34;&gt;指定安装位置&lt;/h2&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#这个也可以不指定，选择默认安装位置。&#xA;export RUST_HOME=/some/path&#xA;export CARGO_HOME=/some/path&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;rustup-安装&#34;&gt;rustup 安装&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;第一次安装 rustup 的时候，如果按照官网教程 &lt;a href=&#34;https://sh.rustup.rs/&#34;&gt;https://sh.rustup.rs&lt;/a&gt; 链接无法下载，可以通过 &lt;a href=&#34;https://cdn.jsdelivr.net/gh/rust-lang-nursery/rustup.rs/rustup-init.sh&#34;&gt;jsdelivr&lt;/a&gt; 下载 rustup-init.sh， 然后把脚本中的 RUSTUP_UPDATE_ROOT 变量改为 &lt;a href=&#34;https://mirrors.ustc.edu.cn/rust-static/rustup%E3%80%82&#34;&gt;https://mirrors.ustc.edu.cn/rust-static/rustup。&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static&#xA;export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;cargo&#34;&gt;cargo&lt;/h2&gt;&#xA;&lt;p&gt;默认位置: &lt;code&gt;$HOME/.cargo/config&lt;/code&gt;&lt;br&gt;&#xA;如果配置了&lt;strong&gt;CARGO_HOME&lt;/strong&gt; 就是 &lt;strong&gt;$CARGO_HOME/config&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>rustlang学习</title>
      <link>https://im.shellj.com/posts/2019/04/rustlang-learning/</link>
      <pubDate>Mon, 01 Apr 2019 10:01:41 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/04/rustlang-learning/</guid>
      <description>&lt;p&gt;下午按着 &lt;a href=&#34;https://github.com/rust-lang/rustlings&#34;&gt;rustlings&lt;/a&gt; 练习了一下 &lt;a href=&#34;https://github.com/rust-lang/rust&#34;&gt;rust&lt;/a&gt; ，比较友好的一个学习工具。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
