Remix.run Logo
skippyboxedhero 2 hours ago

AI is not good at writing Rust. The ways in which it is bad vary from writing code that just looks off to actually not working. I do not use unsafe frequently so cannot comment on this particular scenario but I have seen similar stuff often, most Rust code that I read from AIs has at least one or two issues.

In particular, if you have a situation that requires any kind of conceptual understanding then AI will likely have issues. Sync blocking async is the classic example. My theory is that humans make this worse because they will often prompt in a certain direction and AI will faithfully build the footgun.

conradludgate an hour ago | parent [-]

I haven't experienced these issues with latest models writing performant and correct rust fwiw. It does seem to understand Rust's safety concepts quite well when working on reviewing or writing code