extendr
extendr: Frictionless bindings for R and Rust - Published in JOSS (2024)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
2 of 31 committers (6.5%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
R extension library for rust designed to be familiar to R users.
Basic Info
- Host: GitHub
- Owner: extendr
- License: mit
- Language: Rust
- Default Branch: master
- Homepage: https://extendr.github.io
- Size: 94.9 MB
Statistics
- Stars: 488
- Watchers: 13
- Forks: 50
- Open Issues: 138
- Releases: 4
Topics
Metadata Files
README.md
extendr - A safe and user friendly R extension interface using Rust
Welcome
extendR is a suite of software packages, see the website extendR for an overview.
This repository is for the rust crates that are part of extendR,
see also {rextendr} for the R-package that facilitates using extendR.
A complete user guide detailing how to use extendR is available here.
The main crate extendr-api is published on crates.io.
Getting started
There are many ways to use extendR from R. In an interactive R session one may
use rextendr::rust_function and friends
to quickly prototype Rust code.
In an R package context, one may use rextendr::use_extendr() to setup a Rust powered R-package. See also vignette on R-packages.
It is also possible to inline Rust code in RMarkdown/knitr, see vignette on extendr knitr-engine.
See rextendr package for more information on the available functionality from an R session.
Overview
It is intended to be easier to use than the C interface and Rcpp as Rust gives type safety and freedom from segfaults.
The following code illustrates a simple structure trait
which is written in Rust. The data is defined in the struct
declaration and the methods in the impl.
```rust use extendr_api::prelude::*;
[extendr]
struct Person { pub name: String, }
[extendr]
impl Person { fn new() -> Self { Self { name: "".to_string() } }
fn set_name(&mut self, name: &str) {
self.name = name.to_string();
}
fn name(&self) -> &str {
self.name.as_str()
}
}
[extendr]
fn aux_func() { }
// Macro to generate exports extendrmodule! { mod classes; impl Person; fn auxfunc; } ```
The #[extendr] attribute causes the compiler to generate
wrapper and registration functions for R which are called
when the package is loaded.
The extendr_module! macro lists the module name and exported functions
and interfaces.
This library aims to provide an interface that will be familiar to first-time users of Rust or indeed any compiled language.
Goals of the project
Instead of wrapping R objects, we convert to Rust native objects on entry to a function. This makes the wrapped code clean and dependency free. The ultimate goal is to allow the wrapping of existing Rust libraries without markup, but in the meantime, the markup is as light as possible.
```rust
[extendr]
pub fn my_sum(v: &[f64]) -> f64 { v.iter().sum() } ```
You can interact in more detail with R objects using the Robj
type which wraps the native R object type. This supports a large
subset of the R internals functions, but wrapped to prevent
accidental segfaults and failures.
Contributing
We are happy about any contributions!
To get started you can take a look at our Github issues.
You can also get in contact via our Discord server!
Development
The documentation for the latest development version of extendr-api is available here:
https://extendr.github.io/extendr/extendr_api/
Owner
- Name: Extendr
- Login: extendr
- Kind: organization
- Website: https://extendr.github.io/
- Repositories: 6
- Profile: https://github.com/extendr
Extension libraries for R in Rust
JOSS Publication
extendr: Frictionless bindings for R and Rust
Authors
Section for Animal Welfare and Disease Control, Department of Veterinary and Animal Sciences, University of Copenhagen, Denmark
Section for Animal Welfare and Disease Control, Department of Veterinary and Animal Sciences, University of Copenhagen, Denmark
Section for Animal Welfare and Disease Control, Department of Veterinary and Animal Sciences, University of Copenhagen, Denmark
Tags
FFI bindingsCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Reimert
given-names: Mossa Merhi
orcid: "https://orcid.org/0009-0007-9297-1523"
- family-names: Parry
given-names: Josiah D.
orcid: "https://orcid.org/0000-0001-9910-865X"
- family-names: Denwood
given-names: Matt
orcid: "https://orcid.org/0000-0001-5212-4273"
- family-names: Gussmann
given-names: Maya Katrin
orcid: "https://orcid.org/0000-0001-5634-5903"
- family-names: Wilke
given-names: Claus O.
orcid: "https://orcid.org/0000-0002-7470-9261"
- family-names: Kosenkov
given-names: Ilia
orcid: "https://orcid.org/0000-0001-5563-7840"
- family-names: Milton
given-names: Michael
orcid: "https://orcid.org/0000-0002-8965-2595"
- family-names: Thomason
given-names: Amy
orcid: "https://orcid.org/0000-0001-8240-1614"
doi: 10.5281/zenodo.12584076
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Reimert
given-names: Mossa Merhi
orcid: "https://orcid.org/0009-0007-9297-1523"
- family-names: Parry
given-names: Josiah D.
orcid: "https://orcid.org/0000-0001-9910-865X"
- family-names: Denwood
given-names: Matt
orcid: "https://orcid.org/0000-0001-5212-4273"
- family-names: Gussmann
given-names: Maya Katrin
orcid: "https://orcid.org/0000-0001-5634-5903"
- family-names: Wilke
given-names: Claus O.
orcid: "https://orcid.org/0000-0002-7470-9261"
- family-names: Kosenkov
given-names: Ilia
orcid: "https://orcid.org/0000-0001-5563-7840"
- family-names: Milton
given-names: Michael
orcid: "https://orcid.org/0000-0002-8965-2595"
- family-names: Thomason
given-names: Amy
orcid: "https://orcid.org/0000-0001-8240-1614"
date-published: 2024-07-01
doi: 10.21105/joss.06394
issn: 2475-9066
issue: 99
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 6394
title: "extendr: Frictionless bindings for R and Rust"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.06394"
volume: 9
title: "extendr: Frictionless bindings for R and Rust"
GitHub Events
Total
- Create event: 42
- Release event: 1
- Issues event: 56
- Watch event: 50
- Delete event: 38
- Issue comment event: 139
- Push event: 153
- Pull request event: 100
- Pull request review event: 87
- Pull request review comment event: 78
- Fork event: 6
Last Year
- Create event: 42
- Release event: 1
- Issues event: 56
- Watch event: 50
- Delete event: 38
- Issue comment event: 139
- Push event: 153
- Pull request event: 100
- Pull request review event: 87
- Pull request review comment event: 78
- Fork event: 6
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| andy-thomason | a****y@a****m | 215 |
| CGMossa | c****a@g****m | 108 |
| Hiroaki Yutani | y****i@g****m | 92 |
| Ilia Kosenkov | i****v@o****m | 49 |
| Claus Wilke | w****e@a****u | 21 |
| Maximilian Goisser | g****4@g****m | 18 |
| Josiah Parry | j****y@g****m | 13 |
| dependabot[bot] | 4****] | 10 |
| Michael Milton | m****n@g****m | 9 |
| andy-thomason | a****y@a****m | 6 |
| Daniel Falbel | d****l@g****m | 6 |
| Søren Havelund Welling | s****l@g****m | 5 |
| Thomas Down | t****s@t****k | 5 |
| eitsupi | 5****i | 4 |
| brendanrbrown | 2****n | 2 |
| Wenjie Sun | s****e@g****m | 2 |
| Lucius Hu | l****n | 2 |
| Eric Burden | e****n@g****m | 2 |
| Andrés Felipe Quintero Moreano | a****o@g****m | 2 |
| Xianying Tan | s****n@1****m | 1 |
| Brancen Gregory | b****y@g****m | 1 |
| Daniel Tinoco | 0****s | 1 |
| David B. Dahl | d****l@s****u | 1 |
| Freddy Drennan | d****y@g****m | 1 |
| Justin Landis | 3****s | 1 |
| Nicholas Parker | n****k@n****m | 1 |
| Pierre Donat-Bouillud | p****e | 1 |
| Seth | s****k@g****m | 1 |
| Stanislav Pozdniakov | 7****e | 1 |
| bicarlsen | c****i@g****m | 1 |
| and 1 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 179
- Total pull requests: 391
- Average time to close issues: 10 months
- Average time to close pull requests: about 1 month
- Total issue authors: 28
- Total pull request authors: 26
- Average comments per issue: 4.34
- Average comments per pull request: 3.12
- Merged pull requests: 234
- Bot issues: 0
- Bot pull requests: 36
Past Year
- Issues: 30
- Pull requests: 106
- Average time to close issues: about 1 month
- Average time to close pull requests: 17 days
- Issue authors: 9
- Pull request authors: 12
- Average comments per issue: 0.7
- Average comments per pull request: 1.49
- Merged pull requests: 45
- Bot issues: 0
- Bot pull requests: 20
Top Authors
Issue Authors
- JosiahParry (47)
- yutannihilation (23)
- multimeric (18)
- CGMossa (16)
- eitsupi (8)
- Ilia-Kosenkov (8)
- latot (6)
- andy-thomason (6)
- clauswilke (5)
- andyquinterom (4)
- bicarlsen (3)
- daniellga (3)
- Yunuuuu (2)
- jonlachmann (2)
- avhz (2)
Pull Request Authors
- CGMossa (274)
- dependabot[bot] (46)
- Ilia-Kosenkov (45)
- JosiahParry (39)
- yutannihilation (29)
- andy-thomason (15)
- sorhawell (7)
- eitsupi (7)
- multimeric (7)
- jtlandis (6)
- andyquinterom (6)
- wenjie1991 (4)
- brancengregory (4)
- latot (4)
- albersonmiranda (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 7
-
Total downloads:
- cargo 475,388 total
- Total docker downloads: 51
-
Total dependent packages: 14
(may contain duplicates) -
Total dependent repositories: 33
(may contain duplicates) - Total versions: 51
- Total maintainers: 7
crates.io: extendr-api
Safe and user friendly bindings to the R programming language.
- Documentation: https://docs.rs/extendr-api/
- License: MIT
-
Latest release: 0.8.1
published 6 months ago
Rankings
Maintainers (6)
crates.io: extendr-macros
Generate bindings from R to Rust.
- Documentation: https://docs.rs/extendr-macros/
- License: MIT
-
Latest release: 0.8.1
published 6 months ago
Rankings
Maintainers (6)
crates.io: extendr-engine
Safe and user friendly bindings to the R programming language.
- Documentation: https://docs.rs/extendr-engine/
- License: MIT
-
Latest release: 0.8.1
published 6 months ago
Rankings
Maintainers (6)
crates.io: aorist_extendr-engine
Fork of extendr-engine for aorist project. Safe and user friendly bindings to the R programming language.
- Documentation: https://docs.rs/aorist_extendr-engine/
- License: MIT
-
Latest release: 0.0.1
published over 4 years ago
Rankings
Maintainers (1)
crates.io: aorist_extendr-api
Fork of extendr-api for aorist project. Safe and user friendly bindings to the R programming language.
- Documentation: https://docs.rs/aorist_extendr-api/
- License: MIT
-
Latest release: 0.0.1
published over 4 years ago
Rankings
Maintainers (1)
crates.io: aorist_extendr-macros
Fork of extendr-macros for aorist project. Safe and user friendly bindings to the R programming language.
- Documentation: https://docs.rs/aorist_extendr-macros/
- License: MIT
-
Latest release: 0.0.1
published over 4 years ago
Rankings
Maintainers (1)
crates.io: extendr-ffi
Barebone bindings to `libR` for use in extendr.
- Documentation: https://docs.rs/extendr-ffi/
- License: MIT
-
Latest release: 0.8.1
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- dtolnay/rust-toolchain master composite
- peaceiris/actions-gh-pages v3 composite
- actions/checkout v4 composite
- baptiste0928/cargo-install v2 composite
- actions/checkout v4 composite
- dtolnay/install master composite
- dtolnay/rust-toolchain master composite
- msys2/setup-msys2 v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- extendr-engine 0.4.0 development
- rstest 0.18.1 development
- either 1.8.1
- extendr-macros 0.4.0
- libc 0.2
- ndarray 0.15.3
- num-complex 0.4
- once_cell 1
- paste 1.0.5
- serde 1.0
- proc-macro2 1.0
- quote 1.0.6
- syn 1.0.22
- rextendr * imports
- brio * suggests
- lobstr * suggests
- patrick * suggests
- processx * suggests
- rmarkdown * suggests
- rprojroot * suggests
- stringi * suggests
- testthat * suggests
- vctrs * suggests
