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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Zngur: A C++/Rust interop tool

154 点作者 hkalbasi9 个月前

7 条评论

benreesman9 个月前
Having only glanced at the code I can’t offer much insight beyond “looks plausible”.<p>A far more important point is to address is that any FFI story with C++ that’s well executed is going to be great for the Rust ecosystem, and historically the community’s commitment to C++ interop has seemed tepid at best.<p>Even if one admits that Rust is strictly better than C++ for problems in the relevant domains, which seems an extraordinary claim that exceeds extraordinary evidence, there is still an ocean of C++ that we just can’t rewrite in even a decade, maybe not in a century.<p>There are use cases where Rust is just strictly a better choice: anything with an attack surface like a shell or an SSH daemon, or probably even a browser is an obvious candidate for a language with better reasoning about common attack vectors. I trust my Rust user land a lot more than my C userland.<p>But the “rewrite everything in Rust and push that via bad interop” is limiting the adoption of a cool language.<p>I’m a big fan of efforts to be more incremental.
评论 #41273502 未加载
评论 #41276947 未加载
boguscoder9 个月前
Interesting. Any clue how this compares to <a href="https:&#x2F;&#x2F;cxx.rs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cxx.rs&#x2F;</a>
评论 #41271945 未加载
uneekname9 个月前
I&#x27;ve been learning Rust and really enjoying it, but the primary downside (compared to C++) is the lack of access to the large, well-tested libraries that exist in C++. For example, my work would benefit from using the CGAL library [0], something that be nontrivial to rewrite in Rust. As much as I like Rust, at some point it&#x27;s a better idea to use C++ to tap into libraries like that.<p>Does anyone have thoughts about how mature Zngur&#x2F;CXX&#x2F;etc. are for a project like mine? Would it be reasonable to invest effort in creating those bindings? Thanks.<p>[0] <a href="https:&#x2F;&#x2F;www.cgal.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.cgal.org&#x2F;</a>
评论 #41272052 未加载
评论 #41272019 未加载
评论 #41272101 未加载
评论 #41272719 未加载
pjmlp9 个月前
This kind of tools are great, as C++ isn&#x27;t going away any time soon, and Rust is decades away to be relevant in some domains, specially those where C++ only recently took over C.
mastax9 个月前
Wow! Amazing how reframing the problem to exclude C++ types in rust makes it all so much more elegant.
hi-v-rocknroll9 个月前
Isn&#x27;t Google offering funding for this exact topic?
jdright9 个月前
This is insane.<p>Is this being used in some codebase? How stable is it? What are the plans for it?<p>I have so many questions, but will stick with these for now.