These are chat archives for rust-lang/rust

Mar 2019
something like that in case the idea is novel to anyone
you can build up surprisingly long chains this way
and you tend to get small, easily testable functions
Sam Johnson
Mar 22 2019 17:48 UTC
@vlopes11 Azure pipelines supports all 3
Say my package buz depends on foo that depends on bar-sys
In buz's Cargo.toml I add the following:
rustc-link-search = ["/usr/lib/x86_64-linux-gnu/"]
rustc-link-lib = [""]
however Cargo warns me of an unused manifest key and errors out?
Mar 22 2019 19:27 UTC
the package bar-sys has the appropriate links=bar in its Cargo.toml
Denis Lisov
Mar 22 2019 20:06 UTC
Overrides like this live not in Cargo.toml, but in .cargo/config
Victor Lopes
Mar 22 2019 21:44 UTC
@sam0x17 they are actually awesome. they offer free service w/ support to build all sort of binaries, up to 5 users. I'll try them, thanks for the tip :)
Riley Cat
Mar 22 2019 21:49 UTC
so I've been considering writing a tutorial for rust and I thought I had a pretty good understanding of ownership but something that has been doing my head in is how often rust APIs will accept a borrow to mut self when taking ownership would make way more sense
like in the "learning rust with entirely too many linked lists"
the first chapter is basically nothing but fighting with the borrow checker because the author keeps trying to get around the fact they're borrowing something and trying to move ownership at the same time

and if you just remove the borrows and accept the fact mutating a linked list inherently requires ownership the code becomes straight-forward and the compiler doesn't fight you at all: