Closed Bug 1338282 Opened 4 years ago Closed 3 years ago

rust-url-capi specifies peculiar [] options in its Cargo.toml


(Core :: Networking, defect)

Not set



Tracking Status
firefox54 --- fixed


(Reporter: froydnj, Unassigned)



(Whiteboard: [necko-would-take])


(1 file)

Looking at, we have:

opt-level = 3
debug = true
rpath = true
lto = true

which is...a little aggressive for debugging.  It also causes conflicts with Cargo workspaces, as Cargo expects profile.* to only be specified at the root, and complains if non-root packages specify profile information:

warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/froydnj/src/gecko-dev.git/netwerk/base/rust-url-capi/Cargo.toml
workspace: /home/froydnj/src/gecko-dev.git/Cargo.toml

Valentin, is netwerk/base/rust-url-capi/ a straight import of an upstream package, or is it something local to the Mozilla tree?  In either case, is it possibly to strip out those profile settings?  They only make sense when compiling rust-url-capi as a standalone thing, and don't really apply to either the way we currently include rust-url-capi in our build, or with a future Cargo workspaces setup.
Flags: needinfo?(valentin.gosu)
We can definitely strip them out. They are left from the first time I implemented this, and was testing library size and optimizations. Let me know if you want me to write the patch or review it. Thanks!
Flags: needinfo?(valentin.gosu)
Whiteboard: [necko-would-take]
The options were a little aggressive for debugging and weren't really
applicable when integrating rust-url-capi into a larger project.
Attachment #8837635 - Flags: review?(valentin.gosu)
Comment on attachment 8837635 [details] [diff] [review]
remove options from rust-url-capi's Cargo.toml

Review of attachment 8837635 [details] [diff] [review]:

::: netwerk/base/rust-url-capi/Cargo.toml
@@ -17,3 @@
>  [dependencies]
>  libc = "0.2.0"
>  url = "1.2.1"

This will conflict with bug 1339809 where it's updated to 1.4.0
Attachment #8837635 - Flags: review?(valentin.gosu) → review+
Pushed by
remove options from rust-url-capi's Cargo.toml; r=valentin
Pushed by
remove options from rust-url-capi's Cargo.toml; r=valentin
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.