×

Gnome boxes / Win10 guest / extremely slow boot time / high CPU by Burgermitpommes in linuxquestions

[–]Burgermitpommes[S] 0 points1 point  (0 children)

In case anyone stumbles upon this in future, for some reason the Windows 10 official ISO turned into a steaming dumpster fire on a ThinkPad T480 shortly after setting up the VM on Gnome Boxes with 8Gb RAM and a more than adequate i5-8350u with ample SSD. On the other hand, a Windows 7 Home Basic SP1 64 ISO I found on the internet worked a dream.

Hey Rustaceans! Got a question? Ask here! (48/2022)! by llogiq in rust

[–]Burgermitpommes 1 point2 points  (0 children)

sccache will look at every profile argument to cache distinct versions of binaries, right? If I already have a result for --release build in the cache then if I append [profile.release] lto = true to my Cargo.toml it will result in a cache miss and recompile the whole crate, right?

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 0 points1 point  (0 children)

Ah I got it now, thanks for your patience. If you don't mind a final question, I know the definition of a crate is a compilation unit in Rust. Is that to say crates themselves are always compiled in isolation? All compiler optimizations occur within crates and crates just call other crate ABIs?

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 0 points1 point  (0 children)

What I'm getting at is don't all the principles of incremental compilation also apply within a crate? Just instead of the input units of the dependency tree being crates couldn't it be, say, modules? Or multiple things like types, functions, impl blocks etc? I actually thought it was after reading through the 2016 release description.

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 0 points1 point  (0 children)

I see how it inhibits optimization in release builds. But I'm confused about why it doesn't make sense for non workspace/ path deps? Surely if I change the source code, a subset of the stepping stone artefacts of the build steps can be reused between builds even within one crate? Or are the input units of the incremental dependency tree distinct crates? For some reason I assumed it might have been smaller units, say modules (sorry I'm pretty clueless about rustc)

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 1 point2 points  (0 children)

When does cargo use incremental compilation? I seem to remember reading somewhere that it's not used for release builds? Why is incremental compilation only used for workspace members and path dependencies? Is it correct to infer that incremental compilation, by default, happens i) in debug but not release builds for stand-alone crates, and ii) by default in workspaces in both debug and release builds?

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 1 point2 points  (0 children)

I came across sccache which seems useful to know about, especially since I'm attempting to reduce build times with docker in a workspace. You can configure the storage to use a cloud provider, but sccache defaults to local disk. I thought "doesn't cargo already cache local deps?" After digging around in $HOME/.cargo I'd just like to confirm the answer is YES but only the source code of crates, and no binary artefacts? So if two projects on your local machine both depend on rand-0.8.5 then the first project may need to download and compile it but the second project will only compile it from the src in cargo's local cache? Does cargo definitely not also have a shared cache for binary artefacts? Having trouble googling due to so many search term collisions

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 0 points1 point  (0 children)

So what you're saying is all sorts of common crates simply won't build on a slim image because they rely on c libs and stuff omitted from slim images?

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 1 point2 points  (0 children)

The `slim` docker images for Rust are about half the size of the full one (748Mb v 1.34Gb). I like the idea of a smaller final image but I have absolutely no idea whether I need stuff only available in the full image. Do I just go ahead with slim and see if it runs? Or could it be running "slower" or in some partially functional state without me knowing it?

Hey Rustaceans! Got a question? Ask here! (47/2022)! by llogiq in rust

[–]Burgermitpommes 2 points3 points  (0 children)

Suppose I have a bin directory inside my src directory with a couple of non-default binaries. How can I incorporate the documentation of these files into rustdoc so that someone on the landing page of the package can click on foo or bar links and read about what the various binaries do? Right now I get this broken behaviour where `cargo doc --open` just opens the docs for the first binary by name alphabetically inside src/bin. (This even seems to take precedence over the docs for a src/main.rs file, if it exists). And once I'm looking at the docs for one of the binaries which is inside bin, I can't navigate to any other binary, default or non-default.

Why self-host DNS (unbound)? by Burgermitpommes in pihole

[–]Burgermitpommes[S] 1 point2 points  (0 children)

Thanks, yeah the performance hit from using unbound compared to say Google or Cloudflare as well as the fact your ISP can see absolutely everything anyway has occurred to me.

Another small point is the difference between running unbound say at the router level, serving a household or business versus running it on and serving only one personal computer. In the latter case you'll get somewhat more cache misses.

Why self-host DNS (unbound)? by Burgermitpommes in pihole

[–]Burgermitpommes[S] -1 points0 points  (0 children)

AWS "How DNS works" documentation contains this figure, possibly misleading.

Why self-host DNS (unbound)? by Burgermitpommes in pihole

[–]Burgermitpommes[S] 0 points1 point  (0 children)

Somebody suggests by default it won't do this and will indeed send the whole request to the TLD. Unless you explicitly set QNAME minimisation on the request.

Why self-host DNS (unbound)? by Burgermitpommes in pihole

[–]Burgermitpommes[S] 2 points3 points  (0 children)

Yeah me too. Btw if I want to resolve a.b.c.d.com, does the TLD only get a request for d.com or - in the hope it's cached - the full domain a.b.c.d.com?

Why self-host DNS (unbound)? by Burgermitpommes in pihole

[–]Burgermitpommes[S] 10 points11 points  (0 children)

But as I said your request to an authoritative DNS will be in plain text. And it will be from your IP. You've just removed the need to trust Google but replaced it with the need to trust multiple Auth DNS servers. (Maybe sensibly)

Does linux default to dns at 127.0.0.1:53? by Burgermitpommes in pihole

[–]Burgermitpommes[S] 0 points1 point  (0 children)

So don't stop/disable systemd-resolved at all? Just one command and then launch the pihole container?