Release Notes
Breaking changes
#[savvy]
on a struct's impl
now generates the same name of R object that
holds all the accociated functions. For example, previously the below code
generates a constructor Person()
, but now the constructor is available as
Person$new()
.
struct Person {
pub name: String,
}
/// @export
#[savvy]
impl Person {
fn new() -> Self {
Self {
name: "".to_string(),
}
}
}
New Features
- A struct marked with
#[savvy]
can be used as the return type of the
associated function. In conjunction with the change in v0.3.0, now a
user-defined struct can be used more flexibly than before. Please refer to
the "Struct" section of the guide
- An experimental support on complex is added under
compex
feature flag.
ComplexSexp
and OwnedComplexSexp
are the corresponding Rust types.
OwnedIntegerSexp
and etc now have set_na(i)
method for shorthand of
set_elt(i, T::na())
. This is particularly useful for OwnedLogicalSexp
because its setter interface set_elt()
only accepts bool
and no missing
values.
Fixed bugs
- An expert-only method
new_without_init()
now skips initialization as
intended.
Download savvy-cli 0.4.0