Releases: yutannihilation/savvy
v0.8.1 (2024-11-17)
Release Notes
Bug fixes
- Now a package generated by
savvy init
doesn't ignore.cargo
.
Install savvy-cli 0.8.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.8.1/savvy-cli-installer.sh | sh
Download savvy-cli 0.8.1
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.8.0 (2024-10-31)
Release Notes
New feature
Like anyhow, now you can use ?
to propagate any error that implements the
std::error::Error
trait.
#[savvy]
fn no_such_file() -> savvy::Result<()> {
// previously, you had to write .map_err(|e| e.to_string().into())
let _ = std::fs::read_to_string("no_such_file")?;
Ok(())
}
If you want to implement your own error type and the conversion to
savvy::Error
, please specify use-custom-error
feature to opt-out the
auto-conversion to avoid conflict with impl From<dyn std::error::Error> for savvy::Error
savvy = { version = "...", features = ["use-custom-error"] }
Breaking change
By introducing the anyhow-like conversion, savvy loses the error conversion from
a string (e.g. Err("foo".into())
). Instead, please use savvy_err!()
macro,
which is a shorthand of Error::new(format!(...))
.
#[savvy]
fn raise_error() -> savvy::Result<savvy::Sexp> {
Err(savvy_err!("This is my custom error"))
}
Minor improvements
NumericScalar::as_usize()
andNumericSexp::iter_usize()
now rejects
numbers larger than2^32
on 32-bit targets (i.e. webR). Thanks @eitsupi!
Install savvy-cli 0.8.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.8.0/savvy-cli-installer.sh | sh
Download savvy-cli 0.8.0
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.7.2 (2024-10-27)
Release Notes
Minor Improvements
-
savvy now generates a reduced number of R functions.
-
savvy-cli now rejects a package name containing
.
.
Install savvy-cli 0.7.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.7.2/savvy-cli-installer.sh | sh
Download savvy-cli 0.7.2
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.7.1 (2024-10-21)
Release Notes
Bug fixes
NumericScalar::as_usize()
andNumericSexp::iter_usize()
now fail if the
number is larger than2^53 - 1
because this is the maximum number that can
be safely converted to usize.
Install savvy-cli 0.7.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.7.1/savvy-cli-installer.sh | sh
Download savvy-cli 0.7.1
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.7.0 (2024-10-20)
Release Notes
Breaking Change
Removed TryFrom<Sexp> for usize
, so the following code no longer compiles.
#[savvy]
fn foo(x: usize) -> savvy::Result<()> {
...
}
Instead, you can use i32
and convert it to usize
by yourself. If you are
sure the input number is never negative, you can just use the as
conversion.
If you are not sure, you should use <usize>::try_from()
and handle the error
by yourself. Also, please be aware you need to handle NA as well.
#[savvy]
fn foo(x: i32) -> savvy::Result<()> {
if x.is_na() {
return Err("cannot convert NA to usize".into())?;
}
let x = <usize>::try_from(x).map_err(|e| e.to_string().into());
...
}
Alternatively, you can use newly-added methods, NumericScalar::as_usize()
and
NumericSexp::iter_usize()
. What's good is that this can handle integer-ish
numeric, which means you can allow users to input a larger number than the
integer max (2147483647)!
fn usize_to_string_scalar(x: NumericScalar) -> savvy::Result<Sexp> {
let x_usize = x.as_usize()?;
x_usize.to_string().try_into()
}
usize_to_string_scalar(2147483648)
#> [1] "2147483648"
Install savvy-cli 0.7.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.7.0/savvy-cli-installer.sh | sh
Download savvy-cli 0.7.0
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.6.8 (2024-09-17)
Release Notes
Minor Improvements
savvy init
now generates- slightly better
configure
script that checks ifcargo
command is available cleanup
script to remove the generatedMakevars
after compilationconfigure.win
andcleanup.win
src/Makevars.win.in
instead ofsrc/Makevars.win
for consistency with Unix-alikes
- slightly better
Install savvy-cli 0.6.8
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.6.8/savvy-cli-installer.sh | sh
Download savvy-cli 0.6.8
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.6.7 (2024-09-05)
Release Notes
Minor Improvements
-
Remove the use of non-API call
Rf_findVarInFrame
. -
Now the GitHub release includes an installation script to install the savvy
CLI into$CARGO_HOME/bin
, thanks to cargo-dist. This should make it easier
to usesavvy-cli
on CI.curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.6.7/savvy-cli-installer.sh | sh
- Improve handling of raw identifiers (e.g.
r#struct
) more.
Install savvy-cli 0.6.7
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.6.7/savvy-cli-installer.sh | sh
Download savvy-cli 0.6.7
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
Version 0.6.7-beta.1
Release Notes
Install savvy-cli 0.6.7-beta.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/yutannihilation/savvy/releases/download/v0.6.7-beta.1/savvy-cli-installer.sh | sh
Download savvy-cli 0.6.7-beta.1
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.6.6 (2024-09-04)
Release Notes
Bug fixes
-
Fix inappropriate use of
PROTECT
. Thanks @t-kalinowski! -
Handle raw identifiers (e.g.
r#struct
) correctly.
Download savvy-cli 0.6.6
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
v0.6.5 (2024-07-02)
Release Notes
New features
- Add support for raw, including ALTRAW.
Please be aware that, while this support was added for consistency, I bet it's
really rare that a raw vector is actually needed; if you want to deal with a
binary data on Rust's side, your primary option should be to store it in an
external pointer (of a struct you define) rather than an R's raw vector.
Minor Improvements
-
Wrapper environment of a Rust struct or enum now cannot be modified by users.
-
Remove the use of the following non-API calls:
Rf_findVarInFrame3
STRING_PTR
DATAPTR
Download savvy-cli 0.6.5
File | Platform | Checksum |
---|---|---|
savvy-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
savvy-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
savvy-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
savvy-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
savvy-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |