diff --git a/dev/CODE-OF-CONDUCT.html b/dev/CODE-OF-CONDUCT.html index 0d2a845e..946dfc94 100644 --- a/dev/CODE-OF-CONDUCT.html +++ b/dev/CODE-OF-CONDUCT.html @@ -7,7 +7,7 @@ rextendr - 0.3.1.9000 + 0.3.1.9001 + + + + + +
+
+
+ +
+

Analogous to usethis::use_package() but for crate dependencies.

+
+ +
+

Usage

+
use_crate(
+  crate,
+  features = NULL,
+  git = NULL,
+  version = NULL,
+  optional = FALSE,
+  path = "."
+)
+
+ +
+

Arguments

+ + +
crate
+

character scalar, the name of the crate to add

+ + +
features
+

character vector, a list of features to include from the +crate

+ + +
git
+

character scalar, the full URL of the remote Git repository

+ + +
version
+

character scalar, the version of the crate to add

+ + +
optional
+

boolean scalar, whether to mark the dependency as optional +(FALSE by default)

+ + +
path
+

character scalar, the package directory

+ +
+
+

Value

+

NULL, invisibly

+
+
+

Details

+

For more details regarding these and other options, see the +Cargo docs +for cargo-add.

+
+ +
+

Examples

+
if (FALSE) { # \dontrun{
+# add to [dependencies]
+use_crate("serde")
+
+# add to [dependencies] and [features]
+use_crate("serde", features = "derive")
+
+# add to [dependencies] using github repository as source
+use_crate("serde", git = "https://github.com/serde-rs/serde")
+
+# add to [dependencies] with specific version
+use_crate("serde", version = "1.0.1")
+
+# add to [dependencies] with optional compilation
+use_crate("serde", optional = TRUE)
+} # }
+
+
+
+ + +
+ + + + + + + diff --git a/dev/reference/use_extendr.html b/dev/reference/use_extendr.html index 4f50dce9..bc8e3dfa 100644 --- a/dev/reference/use_extendr.html +++ b/dev/reference/use_extendr.html @@ -13,7 +13,7 @@ rextendr - 0.3.1.9000 + 0.3.1.9001