(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=43498071

Hacker News 的讨论线程关注 Rust 采用 Ferrocene 语言规范 (FLS)。一个主要的担忧是 FLS 的不完整性和潜在的“bug”,尤其是在 unsafe 操作的语义方面。用户 mjw1007 详细说明了之前提交的关于函数调用的问题,指出虽然一些具体的 bug 已经被修复,但更广泛的差距仍然没有解决。Ferrous Systems 的 Xylakant 解释说,FLS 的目标是足以进行编译器认证,而不是 Rust 的完整描述。他们希望社区能够在 Rust 项目采用 FLS 之后,共同填补剩余的空白。其他评论者强调了 FLS 有可能为漏洞检测提供强大的工具。一些人认为 Rust 不会完全取代 C 和 C++ 在某些领域,例如 GPGPU、游戏主机和 GUI 开发,一位评论者指出 GUI 是 Rust 不容易交互的领域。

相关文章
  • Rust 采用 Ferrocene 语言规范 2025-03-30
  • (评论) 2024-08-01
  • (评论) 2023-12-10
  • (评论) 2025-03-29
  • (评论) 2025-03-17

  • 原文
    Hacker News new | past | comments | ask | show | jobs | submit login
    Rust Adopting Ferrocene Language Specification (lwn.net)
    41 points by Tomte 8 hours ago | hide | past | favorite | 12 comments










    It seems to me that the part about unsafe operations is pretty much still unspecified. It's currently just a short paragraph saying it may cause undefined behaviour and a list of high-level descriptions of those unsafe operations. But what's the exact semantics of those operations? When is it undefined?


    The Ferrocene Language Specification has two serious problems: there are very large gaps in it, and what's present is very buggy.

    If you pick a small part and look at it in isolation it typically looks quite plausible, but if you try to follow the definitions it very often just falls apart.



    Are there some interesting public examples of where the FLS fails?




    I know I'm late to the party, but I still wanted to answer this. Disclosure: I am one of the Managing Directors at Ferrous Systems

    I believe you're falling victim ot a common misconception about what the FLS is and what it aims to be. It is - at least as of now - a description of the language that is good enough to certify the compiler. It was never intended to be a spec that describes Rust in completeness - for example, the FLS is absolutely insufficient to implement a Rust compiler. As such, we have no aspirations to completeness in any shape or form. While we get a lot of feedback about pieces that people consider falling short of their expectations, it is expected that there are gaps that Ferrous Systems will never try to fill. The FLS in its current shape is good enough for us.

    Now that the Rust project adopted the FLS as the initial nucleus of a spec, I hope that others can contribute and fill the gaps that they need filled.



    From experience with these kinds of specs, one might be better off clearly stating things that are left to the compiler implementation (and thus should have no impact -?-on the verifiability of the spec).


    This is much bigger news than I think people realise. With the push for more secure systems programming language, having a formal model will enable much more powerful tooling and theorem proving that will help spot, model, or identify vulnerabilities. (There will still be a class of vulnerabilities from when the implementation does not match the specification).


    Yeah and at the same time there are efforts to verify standard library using Kani: https://model-checking.github.io/verify-rust-std/

    Between this and Bjarne Stroustrup panic leaked email to C++ standards committee members, it's going to be interesting for Rust's future.



    While I agree with the huge adoption improvements, there is also a dose of reality check required.

    There are several domains where C++ never managed to displace C, and likewise the same seems bound to happen with Rust towards C and C++, regardless of safety improvements.

    Khronos API definitions, the whole GPGPU ecosystem including vendor tooling, all major runtimes and compiler frameworks, consoles devkits, are few domains where Rust has yet to have a presence.



    All GUI domain seems to be one big state, and that is the kind of place Rust refuses to interact with easily.


    That's not true. There are many GUI libraries for Rust.


    There are. You can do it. It's just that the language fights you on it.






    Join us for AI Startup School this June 16-17 in San Francisco!


    Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



    Search:
    联系我们 contact @ memedata.com