Skip to content

Switch to a cargo workspace.

Jordan Petridis requested to merge alatiera/librsvg:cargo_workspace into master

This converts the /rust folder into a cargo workspace so in the future it could host more crates than just the library. As of now it contains only rsvg_internals crate which is the existing library but in the future rsvg-view-3 and rsvg-bench could be migrated into the workspace.

The processes for adding a crate into the workspace is the following:

  • Create a new crate in the workspace root(currently /rust) preferably with cargo new.
  • Add workspace = "../" into new crate's Cargo.toml under the [package] attribute.
  • Add the new crate's name in the members list of the Workspace's(root/Cargo.toml) Cargo.tomlfile

One thing that might make sense too now, is to move the workspace on form the /rust to the root of the repo since each subcrate will have it's own folder. So we would end up with rsvg-intertnals/ along side the C files and get rid of the /rust folder.

Edited by Jordan Petridis

Merge request reports