<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="287558" data-post-id="287558">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="w0rd-driven" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/w0rd-driven/120/18448_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  w0rd-driven
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If this were me I’d evaluate the robustness of the client libraries. Is the rust version more feature complete? Would you be the one rolling the elixir version from scratch?</p>
<p>One recent run in I had with this was parsing mp3 id3 tags. There are a few Elixir libraries and one that marshalls to Rust. The rust version takes more to compile and requires some extra hoops but the underlying library is more feature complete than a few of the Elixir versions. I mostly want to grab something and go, especially at the prototype phase I was in. I never strive for dependency-free applications, I have to be <strong>reeeallly</strong> convinced to roll my own anything. That’s usually a last resort.</p>
<p>If either library saw feature parity and very active code bases I’d choose always Elixir. I’ll generally have an easier experience based on everyone else’s recommendations.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287558" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/long-running-tasks-and-external-processes-in-elixir-or-rust/55723/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-287558" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287558"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="287559" data-post-id="287559">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well in that case it seems you have your answer – if the Elixir library is not up to the task then go with the Rust NIF or external tool. My answer was with the context of “if you have a choice”. If you don’t have the choice then it’s a different game entirely.</p>
<p>Though I’m not sure what was “nobody cares” addresses at.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287559" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/long-running-tasks-and-external-processes-in-elixir-or-rust/55723/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-287559" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287559"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="287562" data-post-id="287562">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="krstfk" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  krstfk
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Would you care to share what are those libraries that don’t have -mature- implementation in elixir but do in rust.<br>
According to your posts, the workload is not cpu bound. If correct, then use elixir, it’ll be easier.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287562" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/long-running-tasks-and-external-processes-in-elixir-or-rust/55723/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-287562" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287562"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="287565" data-post-id="287565">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="derek-zhou" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/derek-zhou/120/19943_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  derek-zhou
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OrontaMedu" data-post="1" data-topic="55723">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/o/eb9ed0/48.png" class="avatar"> OrontaMedu:</div>
<blockquote>
<p>via an non-Elixir library (in Rust): <code>System.cmd("external_utility", [a, b, c])</code></p>
</blockquote>
</aside>
<p>Much have been said about you should stick with a pure Elixir approach, then only move on to Rust NIF when there is significant benefit in doing so. I want to point out the CGI style <code>System.cmd</code> interface is most likely not what you want, should you decide that neither pure Elixir nor Rust NIF is good enough for you.</p>
<p>If you must use an external process, then the only valid reason is that you need to keep significant state in that external process. The best way to communicate with a stateful external process is via a port. Rust offers an excellent async library, <a href="https://tokio.rs/" rel="noopener nofollow ugc">Tokio</a>, to make that happen. You would need to write a couple hundred lines of Rust code to wrap the Rust library though.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287565" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/long-running-tasks-and-external-processes-in-elixir-or-rust/55723/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-287565" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287565"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>