what's a bit of obscure rust/rustup/cargo/crates.io lore that you know?
@fasterthanlime Unclear how obscure it is but I'm a fan of specifying target runners (https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner) when working on a cross platform project. Stuff like `cargo test --target x86_64-pc-windows-gnu` can frequently be ran on linux by setting the runner to wine64. This is sometimes done with qemu for embedded projects and I've used it with apple device simulator targets (iOS, watchOS, tvOS, visionOS).
@fasterthanlime The only way to regenerate `Cargo.lock` without doing any other work is `cargo update --workspace`. The documentation for this flag is unclear at best.
You might think `cargo generate-lockfile` should be able to do this, but that's not currently the case.
@fasterthanlime
once upon a time back in 2017 no one on windows could do anything involving crates because someone published a crate named `nul`
@carol @fasterthanlime was the crate unpublished or did cargo start mangling names to avoid it
/Cinny
@CosmicHorror @calisti yep. technically it could be used to give certain crates above-default priority, but iβve never seen that happen. https://github.com/rust-lang/docs.rs/pull/714
@aDot @CosmicHorror @calisti Is there a way to list currently deprioritized patterns?
@ericseppanen this took me a while to fact check, the docs gets confusing
@fasterthanlime when parsing \ followed by n in a string literal, the parser emits β\nβ. the mapping to ASCII 0x0A does not exist in source code, only in the bootstrap binary
(β¦or it didn't last i looked)
@simon I'm having trouble wrapping my head around that one: I figured maybe it's possible that `\n` is copied wholesale to LLVM IR, but.. surely const eval knows that `\n` means 0x0A right? I'm not sure I follow
@5225225
We deleted the crate and forbade any crate from having the name of any special Windows filename
@fasterthanlime
@fasterthanlime to extract the unescaped value of a literal, rustc eventually calls this code which is itself written in rust and can therefore spell "ASCII 0x0A" as b'\n'
https://github.com/rust-lang/literal-escaper/blob/v0.0.5/src/lib.rs#L399-L415