Skip to content

Commit b84a407

Browse files
Explain how to configure PATH (#1)
1 parent 4e5721b commit b84a407

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ The current version of cargo/rustc on __Fedora__ can be found here:
3131

3232
However, some of your users may actually be running Ubuntu/RHEL LTS platforms, which have even older versions of rust. Remember that many R users are on shared servers and don't have permissions to install/upgrade rustc. Hence try to be convervative in assuming the latest dependencies / rust features in your package.
3333

34+
## They say Rust is installed, but `cargo` cannot be found in `PATH`?
35+
36+
This might happen on UNIX-alike platforms. `PATH` is typically configured in the shell's startup scripts like `.bash_profile` and `.zprofile`, but it seems these scripts might not be loaded in some cases. In order to address this, you should either add `$HOME/.cargo/bin` to `PATH` ([example](https://github.com/r-rust/hellorust/blob/8902d6677d70d91b7336a90ba3d8d41f4a9011cd/src/Makevars#L17)) or source `$HOME/.cargo/env`, if it's available, before executing `cargo` command.
37+
3438
## How to avoid writing in HOME
3539

3640
CRAN has a policy:
@@ -48,7 +52,7 @@ The R for Windows toolchains since R-3.3.0 have been compatible with the rustc `
4852
Note that you can build and check packages yourself on Windows with R-4.1.x (and older) using e.g. GitHub actions CI or [r-runiverse](https://r-rust.r-universe.dev/ui#builds), because the toolchains are actually fine. The problem is just the CRAN server.
4953

5054

51-
## Should I mention authors of 3rd party cargo crates in the description/license
55+
## Should I mention authors of 3rd party cargo crates in the description/license?
5256

5357
Generally speaking, the R package description and license files (that are included with every source package) should declare authorship and copyright of __all source code that is contained within this source package__. Hence, if you copied any material authored by other people in a package that you submit to CRAN, you must mention those people and the copyright in the description, because CRAN hosts this material on their servers.
5458

0 commit comments

Comments
 (0)