Hi folks,

I just wanted to share some notes on using Cargo in Gecko. One of the
requirements was vendoring packages in tree. It turns out I was able to do
that with a .cargo/config file in the scope of the rust directory, which
defines the paths for dependencies, and [http] timeout = 0, which prevents
downloading any resources from crates.io. [1]
Better support for this use case would be welcome, such as making sure no
network connections are made (the index still gets refreshed), but this is
good enough for what we need at the moment.

I'm not sure if we've agreed to have a top level directory for all of the
rust crates, but I think it makes sense. It allows for easier sharing of
crates (between necko and media for example).
>From what I understand servo's mach has a command for two-way sync between
web-platform-tests and upstream. This would be a nice feature for cargo, as
most of our dependencies would come from crates.io. So identifying the
upstream repo, and doing a diff would be super awesome - probably for other
projects as well.

I'll probably have more to share once/if I manage to use cargo withing
Gecko's build system.

Thanks!

[1] https://github.com/rust-lang/cargo/issues/1926
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to