Original Summary

I&#x27;m trying to build a web app in Rust using axum, and am thinking whether I can export that Rust code to Lean4 so that I can verify business logic or security properties.<p>I first tried Aeneas, but it can only work for restricted grammer and structurs that are hard to review (it even doesnt look like Rust).<p>For example, when I want to write:<p>`` fn find_post(ps: &amp;[Post], id: u64) -&gt; Option&lt;&amp;Post&gt; { ps.iter().find(|p| p.id == id) } `<p>I have to write:<p>` pub fn find_post(ps: &amp;Vec&lt;Post&gt;, id: u64) -&gt; Option&lt;Post&gt; { let mut i = 0; while i &lt; ps.len() { if ps[i].id == id { return Some(ps[i].clone()); } i += 1; } None } ``<p>Is there anybody who have addressed this kind of problem??<p>For anyone interested, the experiment source and examples are at https:&#x2F;&#x2F;github.com&#x2F;h5i-dev&#x2F;i5h. I&#x27;ve ported parts of a few real web apps (e.g., Kellnr, Atuin, Wastebin, Conduit), and their core logic can now be verified to some extent. Ofcourse, that does assume the rest is correct, like axum&#x2F;hyper for HTTP and PostgreSQL plus the engine for storage.


  • 情报分类:商业与市场研究
  • 分类依据:内容涉及商业、投资或市场动态
  • 信息来源:Hacker News 新项目
  • 发布时间:2026/9/29 00:42:59