<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>matsu7874</author_name>
  <author_url>https://blog.hatena.ne.jp/matsu7874/</author_url>
  <blog_title>matsu7874のブログ</blog_title>
  <blog_url>https://matsu7874.hatenablog.com/</blog_url>
  <categories>
    <anon>Advent Calendar</anon>
    <anon>Rust</anon>
  </categories>
  <description>Rust Advent Calendar 2019の24日目の記事です。 バイナリファイルを配布して運用してもらうとなると、version情報の出力は必須オプションですね。 この記事ではCargo.tomlのversionを出力する方法を、RustでCLIツールを開発する際の標準的なcrateであるClapとgetoptsそれぞれについて解説していきます。 その後gitのコミットハッシュなどの追加情報を出力する方法を検討します。 Cargo.tomlのversionを表示したい場合 Cargo.tomlにはversion属性があるので、semantic versioningを信じるのであれば、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmatsu7874.hatenablog.com%2Fentry%2F2019%2F12%2F24%2F080000&quot; title=&quot;RustのCLIツールにバージョン情報を出力するオプションを追加する方法 - matsu7874のブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-12-24 08:00:00</published>
  <title>RustのCLIツールにバージョン情報を出力するオプションを追加する方法</title>
  <type>rich</type>
  <url>https://matsu7874.hatenablog.com/entry/2019/12/24/080000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
