<p dir="auto">requested by @bartlomieu following our chat on the deno/lobby i'm opening an issue concerning, how can we do to write a plugin in pure C code ?<br>
for exemple:</p>
<p dir="auto">-- hello.c</p>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include &lt;stdio.h&gt;

void deno_plugin_init(void){
    puts(&quot;Welcome in the deno land  !&quot;);
}

void dino(void){
    puts(&quot;[OK]&quot;);
}"><pre class="notranslate"><span class="pl-k">#include</span> <span class="pl-s">&lt;stdio.h&gt;</span>

<span class="pl-smi">void</span> <span class="pl-en">deno_plugin_init</span>(<span class="pl-smi">void</span>){
    <span class="pl-en">puts</span>(<span class="pl-s">"Welcome in the deno land  !"</span>);
}

<span class="pl-smi">void</span> <span class="pl-en">dino</span>(<span class="pl-smi">void</span>){
    <span class="pl-en">puts</span>(<span class="pl-s">"[OK]"</span>);
}</pre></div>
<p dir="auto">gcc -c -Wall -fpic hello.c<br>
gcc -shared -o libhello.so hello.o<br>
and the following deno code:</p>
<p dir="auto">hello.ts</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const libhello = Deno.openPlugin(&quot;./libhello.so&quot;)
const funct_hello = libhello.ops
// this thing work correctly and call deno_plugin_init from my &quot;.so&quot; library
funct_hello.dino()
// Type 'PluginOp' has no call signatures."><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">libhello</span> <span class="pl-c1">=</span> <span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-en">openPlugin</span><span class="pl-kos">(</span><span class="pl-s">"./libhello.so"</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">funct_hello</span> <span class="pl-c1">=</span> <span class="pl-s1">libhello</span><span class="pl-kos">.</span><span class="pl-c1">ops</span>
<span class="pl-c">// this thing work correctly and call deno_plugin_init from my ".so" library</span>
<span class="pl-s1">funct_hello</span><span class="pl-kos">.</span><span class="pl-en">dino</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c">// Type 'PluginOp' has no call signatures.</span></pre></div>
<p dir="auto">so how can we do ?</p>