<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>E_Mattsan</author_name>
  <author_url>https://blog.hatena.ne.jp/E_Mattsan/</author_url>
  <blog_title>エンジニアのソフトウェア的愛情</blog_title>
  <blog_url>https://blog.emattsan.org/</blog_url>
  <categories>
    <anon>Elixir</anon>
    <anon>C++</anon>
  </categories>
  <description>使い慣れている言語が C++ なので、ここでは C++ で説明しますが基本的に C 言語でも同じように記述できるはずです。 というか、世の中の NIF の説明は圧倒的に C 言語が多い。 詳細の解説は置いておいて。コードを書いてから呼び出せるところまでを順にたどってゆきます。 （不備など発見されましたらご指摘いただけると幸いです） C++ のコードを用意する 二つの整数の和を返す add(int, int) を定義し、これを Elixir から呼び出すインタフェースを書きます。 #include &lt;erl_nif.h&gt; int add(int x1, int x2) { return x1 +…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.emattsan.org%2Fentry%2F2019%2F12%2F22%2F175901&quot; title=&quot;C++ による NIF ことはじめ - エンジニアのソフトウェア的愛情&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>https://images-fe.ssl-images-amazon.com/images/I/41ILntSocFL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-12-22 17:59:01</published>
  <title>C++ による NIF ことはじめ</title>
  <type>rich</type>
  <url>https://blog.emattsan.org/entry/2019/12/22/175901</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
