Closed Ilia-Kosenkov closed 1 year ago
By persuasion, I think you should go for the use_dev_extendr
option, and honestly that will be used by us so often, that we probably won't deprecate that syntax for a long, long time.
Just to clarify, by ' use_dev_extendr
option' you mean the example that I show above or perhaps getOption('use_dev_extendr')
?
Because if it is the first one, then I totally agree -- I myself will be using it A LOT :-D
Since
extendr
releases are infrequent, there can be a situation when a desired feature is already available in dev version ofextendr
, but not on crates.io. Currently, when dynamically compiling rust code, this can be overcome by hijackingextendr_deps
orpatch.crates_io
:I propose to provide a shortcut in a form of a boolean flag
use_dev_extendr = FALSE
, which selectsextendr_deps
(stored in options).So the abovementioned code simplifies to just
I believe this is a dramatic simplification of the API, allowing curious people to explore extendr features right from their R terminal, without the need of a complex project setup.
Note that we will not reduce the flexibility & functionality of
rust_source()
, it will just get an additional parameter, which will impact compilation only ifextendr_deps
areNULL
( == not specified by the user). In advanced scenarios, the flag is ignored.