hellorust | Template R package with rust bindings | DevOps library
kandi X-RAY | hellorust Summary
kandi X-RAY | hellorust Summary
The standard rust toolchain includes a great package manager cargo with a corresponding registry crates.io. Cargo makes it very easy to build a rust package including all dependencies into a static library that can easily be linked into an R package. This is perfect for R because we can compile and link all rust code at build-time without any system dependencies. Rust itself has no substantial runtime so the resulting R package is entirely self contained. Indeed, rust has been designed specifically to serve well as an embedded language.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hellorust
hellorust Key Features
hellorust Examples and Code Snippets
Community Discussions
Trending Discussions on hellorust
QUESTION
I am in the process of developing an R package with external source code that takes a long time to compile. While compilation time isn't a big problem for a one-off installation, I have to routinely reinstall the package to test new additions. Is it possible to prevent re-compiling the source code if there haven't been any changes to it?
I don't necessarily need this to be automated, but I can't figure out a manual solution either. As my source code is in Rust, the following serves as the most representative example I have (note that it requires Rust cargo to be installed):
...ANSWER
Answered 2020-May-11 at 14:39Based on the comments by r2evans, the final answer seems to be that this isn't what devtools::install
is for.
As per the devtools
documentation, there are three main tools for "frequent development tasks":
load_all
document
test
Of these load_all
"simulates installing and reloading your package, loading R code in R/, compiled shared objects in src/ and data files in data/". By default, load_all()
will not recompile source code in src/ (unless the recompile
flag is set to true).
So the answer is to use load_all
as opposed to install
during package development and manually control when to compile the source code using something like devtools::compile_dll
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hellorust
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page