TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is it better to use Rust for SDK's core?

1 点作者 devj超过 3 年前
We are on the process of creating an SDK for our thin(API) client.<p>Saw an article by TemproalIO - https:&#x2F;&#x2F;docs.temporal.io&#x2F;blog&#x2F;why-rust-powers-core-sdk&#x2F; which states the following:<p>&quot;When it comes to connecting multiple languages to a shared library, the traditional choice is often C, but Rust makes for a safer and more modern alternative. Having language SDKs directly link to the Rust core meets our end-user-ease goal and keeps overhead low. There are other ways we could&#x27;ve tackled the problem (for example by running another process that communicates with the language-specific SDK over some kind of IPC), but those options probably fail our ease-of-use goal. If desirable, we can always run out-of-process later because we use Protobufs to represent data passed between the Core and language-specific SDKs. This technique also reduces the amount of duplicate code we would have to write for each new language. Rust also very easily compiles to WASM, which unlocks some very interesting possibilities...&quot;<p>If you have already worked on a similar use-case, please share your experience.

暂无评论

暂无评论