Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911841 - dev-lang/nim support USE=system-bootstrap
Summary: dev-lang/nim support USE=system-bootstrap
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Nim project
Depends on:
Reported: 2023-08-07 09:10 UTC by Esteve Varela Colominas
Modified: 2023-08-07 10:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Esteve Varela Colominas 2023-08-07 09:10:22 UTC
The c_code/ directory in the release tarball is a pre-compiled version of the compiler being built (the exact same version as the compiler sources, unlike the csources{,_v1,_v2} repo on github).
While it's still C, and thanks to that not a real issue in terms of portability, unlike rust's stage0, I still think it's not ideal in terms of readability, and knowing for sure it hasn't been tampered with ("trusting trust").
I'm not looking to solve the bootstrapping problem within gentoo, but one of the things I like is enabling USE=system-bootstrap locally, as doing so only requires me to trust only the initial binary I used (which I can supply manually as well, e.g. with go where I build go1.4 manually).

Since the bootstrapping process of nim is very similar to go, rust, and everything else (bootstrap binary/tarball builds the real thing, which then rebuilds itself again), I think it'd be a good thing to have a way to build nim with nim, instead of always building with csources. Either something like go's dev-lang/go-bootstrap or rust's USE=system-bootstrap would work towards this end.

Consider this a proposal more than anything, depending on how it's received I might want to work on this myself.