Create an empty project:
$ xmake create -l rust -t console test
For more examples, see: Rust Examples
example: https://github.com/xmake-io/xmake/tree/dev/tests/projects/rust/cargo_deps
Integrating dependencies directly using add_requires("cargo::base64 0.13.0") above has a problem.
If there are a lot of dependencies and several dependencies all depend on the same child dependencies, then there will be a redefinition problem, so if we use the full Cargo.toml to manage the dependencies we won't have this problem.
For example
For a complete example see: cargo_deps_with_toml