Build a Julia library from specific packages
Source: R/library.R
Description
Like install_library(), but compiles only packages and writes the library to out, for package development. By default, it builds the package in the working directory into its .jlbind/ directory, which devtools::load_all() then uses instead of the library from install_library(). To use a library written elsewhere, set JLBIND_LIBRARY to its path before loading the package.
Usage
build_library(
packages = ".",
out = NULL,
julia = NULL,
versions = c("manifest", "compat"),
develop = NULL
)Arguments
packages
|
Paths to package sources or installed packages, or names of installed packages. An entry containing a / (or \ on Windows), or that is "." or "..", is a path; any other is a package name, so write "./mypkg" for the sources in the mypkg directory.
|
out
|
Directory to write the library to. Defaults to .jlbind/ in the sources of packages, which must then be a single path.
|
julia
|
Path to the julia executable. By default, the JULIA environment variable, or julia on the PATH.
|
versions
|
Where the Julia dependency versions come from. "manifest" keeps the versions in the first package’s Manifest.toml where the other packages’ [compat] bounds allow. "compat" ignores the manifests and lets Julia’s resolver choose versions from the [compat] bounds alone.
|
develop
|
Paths to local Julia packages to use instead of their released versions. |
Value
The path to the library, invisibly.
Examples
# In the sources of a package that uses jlbind
build_library()
devtools::load_all()
# Several packages, used through JLBIND_LIBRARY
lib <- build_library(c("pkg1", "pkg2"), "jlbind-lib")
Sys.setenv(JLBIND_LIBRARY = lib)