4 ms·
One detail I enjoy from this post is that sometimes you can just call a CLI[0]. It's easy to spend a lot of time figuring out how to expose some Rust/C code as
by polyrand 3y ago
One detail I enjoy from this post is that sometimes you can just call a CLI[0]. It's easy to spend a lot of time figuring out how to expose some Rust/C code as a library for your language, but I like the simplicity of just compiling, shipping the binary and then calling it as a subprocess.
Yes, there's overhead in starting a new process to "just call a function", but I think this approach is still underutilized.
[0]: https://github.com/vercel/turbo/blob/c0ee0dea7388d1081512c934ea39a9b78137a1a3/crates/turborepo/src/main.rs#L14 https://github.com/vercel/turbo/blob/c0ee0dea7388d1081512c93...
- phamilton 3y agoI have a love/hate relationship with AWS's Kinesis Client Library. In one of our implementations, we use the `amazon_kcl_helper.py` script (python) to download and configure the KCL Multilang Daemon (a java application) which calls out to our application (a golang binary) via STDIN/STDOUT. And honestly, it's fine. The Multilang Daemon manages shard ownership, spins up one binary per shard, fetches records, passes them to the binary, updates checkpoints, etc. Our binary just focuses on our actual application logic. And the python script does a good job of setting everything up. It just feels wild to involve all three.