frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Automatically Translating C to Rust

https://cacm.acm.org/research/automatically-translating-c-to-rust/
64•FromTheArchives•1w ago

Comments

pizlonator•5h ago
The code I've seen that was autotranslated from C to Rust has an absolutely hopeless number of unsafe statements.

You're better off using Fil-C.

levodelellis•5h ago
I find it funny AF that Fil-C is safer than languages with the unsafe keyword. Who knew C could be so safe with a proper compiler
uecker•2h ago
The memory model of C is intentionally designed to allow safe implementations (still from the time of hardware-segmented methods).
timeon•47m ago
> proper compiler

Not just compiler but GC as sell. So it does note solve same problem as Rust.

ralegh•3h ago
Wonder if it would be better to auto translate to broken rust, ie forcing the user to fix memory issues. I imagine that would lead to pretty big refactors in some cases though.
Animats•2h ago
No. What comes out of C2Rust is awful. The Rust that comes out reads like compiler output. Basically, they have a library of unsafe Rust functions that emulate C semantics. Put in C that crashes, get Rust that crashes in the same way. Tried that on a JPEG 2000 decoder.
stared•1h ago
Tried Claude Code with explicit instructions to create idiomatic code and avoid unsafe statements?
procaryote•3h ago
The other direction might be more interesting, in case rust drops in popularity in a couple of years, leaving behind a bunch of "let's rewrite in rust" efforts
speedgoose•3h ago
I am not convinced that anyone would take a working rust project and rewrite it in C. I don’t see any good reason to do so.

When rust will lose popularity, it is going to happen eventually, I would bet it’s in favour of a newer and more promising programming language. Not C.

VBprogrammer•2h ago
I think Rust has hit critical mass. It's now basically the default choice for something you want to perform well but want to be reasonably secure. For example, uv in the python ecosystem.
m00dy•1h ago
Rust is the clear winner of the LLM era. With code generation being so effortless, why would you write in any other language?
rererereferred•2h ago
That would also help use Rust in platforms that only have a C compiler.
indigoabstract•18m ago
That could be interesting. If some new language or tool appears that automatically figures out the correct lifetime and ownership of the resources in your program, people (might be the same people) will call for rewrites from Rust into the new language, as you would no longer have to assign memory ownership manually.
Animats•3h ago
The article doesn't address the hard problem of figuring out array sizes. There's some work going on as part of the DARPA TRACTOR program to work on that. This area, of course, is the usual cause of buffer overflows.

The goal is to convert C pointers to Rust arrays, pointer arithmetic to Rust slices, and array allocations to Vec initialization. The hard problem is figuring out the sizes of arrays, which is going to require global analysis down the call chain.

If you're going to publish papers on this, please address that problem.

uecker•58m ago
Of course, one you have identifies the bounds to each pointer you could just do bounds checking in C.

Backpropagation is a leaky abstraction (2016)

https://karpathy.medium.com/yes-you-should-understand-backprop-e2f06eab496b
150•swatson741•5h ago•62 comments

Notes by djb on using Fil-C (2025)

https://cr.yp.to/2025/fil-c.html
100•transpute•5h ago•17 comments

When O3 is 2x slower than O2

https://cat-solstice.github.io/test-pqueue/
24•keyle•4d ago•2 comments

Visopsys: OS maintained by a single developer since 1997

https://visopsys.org/
351•kome•13h ago•69 comments

We reduced a container image from 800GB to 2GB

https://sealos.io/blog/reduce-container-image-size-case-study
15•untrimmed•6d ago•8 comments

How I use every Claude Code feature

https://blog.sshh.io/p/how-i-use-every-claude-code-feature
273•sshh12•11h ago•86 comments

Claude Code can debug low-level cryptography

https://words.filippo.io/claude-debugging/
331•Bogdanp•16h ago•163 comments

Updated practice for review articles and position papers in ArXiv CS category

https://blog.arxiv.org/2025/10/31/attention-authors-updated-practice-for-review-articles-and-posi...
454•dw64•20h ago•208 comments

Crossfire: High-performance lockless spsc/mpsc/mpmc channels for Rust

https://github.com/frostyplanet/crossfire-rs
69•0x1997•8h ago•6 comments

Pomelli

https://blog.google/technology/google-labs/pomelli/
186•birriel•12h ago•64 comments

LM8560, the eternal chip from the 1980 years

https://www.tycospages.com/other-themes/lm8560-the-eternal-chip-from-the-1980-years/
49•userbinator•6h ago•18 comments

FlightAware Map Design

https://andywoodruff.com/posts/2024/flightaware-maps/
26•marklit•5d ago•10 comments

GHC now runs in the browser

https://discourse.haskell.org/t/ghc-now-runs-in-your-browser/13169
312•kaycebasques•18h ago•100 comments

Show HN: Why write code if the LLM can just do the thing? (web app experiment)

https://github.com/samrolken/nokode
334•samrolken•17h ago•240 comments

Automatically Translating C to Rust

https://cacm.acm.org/research/automatically-translating-c-to-rust/
64•FromTheArchives•1w ago•15 comments

Anonymous credentials: rate-limit bots and agents without compromising privacy

https://blog.cloudflare.com/private-rate-limiting/
68•eleye•10h ago•33 comments

SQLite concurrency and why you should care about it

https://jellyfin.org/posts/SQLite-locking/
309•HunOL•22h ago•140 comments

Hyperbolic Non-Euclidean World (2007)

http://web1.kcn.jp/hp28ah77/
17•ubavic•6d ago•2 comments

Beginner-friendly, unofficial documentation for Helix text editor

https://helix-editor.vercel.app/start-here/basics/
136•Curiositry•15h ago•45 comments

3M Diskette Reference Manual (1983) [pdf]

https://retrocmp.de/fdd/diskette/3M_Diskette_Reference_Manual_May83.pdf
83•susam•5d ago•18 comments

Chip Hall of Fame: Intel 8088 Microprocessor

https://spectrum.ieee.org/chip-hall-of-fame-intel-8088-microprocessor
27•stmw•6d ago•1 comments

Context engineering

https://chrisloy.dev/post/2025/08/03/context-engineering
5•chrisloy•2h ago•0 comments

From 400 Mbps to 1.7 Gbps: A WiFi 7 Debugging Journey

https://blog.tymscar.com/posts/wifi7speedhunt/
110•tymscar•15h ago•83 comments

The Smol Training Playbook: The Secrets to Building World-Class LLMs

https://huggingface.co/spaces/HuggingFaceTB/smol-training-playbook
195•kashifr•2d ago•12 comments

CLI to manage your SQL database schemas and migrations

https://github.com/gh-PonyM/shed
24•PonyM•4h ago•11 comments

A Few Words About Async

https://yoric.github.io/post/quite-a-few-words-about-async/
52•vinhnx•10h ago•18 comments

How to Build a Solar Powered Electric Oven

https://solar.lowtechmagazine.com/2025/10/how-to-build-a-solar-powered-electric-oven/
57•surprisetalk•1w ago•28 comments

SailfishOS: A Linux-based European alternative to dominant mobile OSes

https://sailfishos.org/info/
282•ForHackernews•13h ago•116 comments

You Don't Need Anubis

https://fxgn.dev/blog/anubis/
119•flexagoon•7h ago•97 comments

Dating: A mysterious constellation of facts

https://dynomight.net/dating/
101•tobr•2d ago•95 comments