Closed Ilia-Kosenkov closed 3 years ago
I feel that both
to_toml(...,
features = list(ndarray = integer(0))
)
and
to_toml(...,
features = list(ndarray = rextendr::toml_empty_array())
)
are ugly. How about replacing NA
s with nothing, so you could write:
to_toml(...,
features = list(ndarray = NA)
)
@clauswilke, yeah, we can do that. I will try to draft a PR for this.
Currently,
extendr
has at least one feature-guarded...well, feature:ndarray
support https://github.com/extendr/extendr/blob/00fed0d8fce2ca0a3c4bf822f685d0d6ada0a1ae/extendr-api/src/prelude.rs#L56-L60I realized it is currently impossible to write
[features]
toCargo.toml
, nor pass any explicit arguments tocargo
during compilation.Relevant changes should probably be made here https://github.com/extendr/rextendr/blob/31c3cd331b0923f17da22c0f27d2168c2014f1e7/R/source.R#L154-L159
Currently
to_toml
supports empty arrays by providingR
vector of length 0, so enablingndarray
feature might look like:Alternatively, we can export something like
rextendr::toml_empty_array()
.