{"id":21070385,"url":"https://github.com/stencila/rasta","last_synced_at":"2025-07-19T02:04:20.178Z","repository":{"id":49813535,"uuid":"169194351","full_name":"stencila/rasta","owner":"stencila","description":"🌴 R interpreter for executable documents","archived":false,"fork":false,"pushed_at":"2021-10-11T22:00:27.000Z","size":196,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T02:46:34.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://stencila.github.io/rasta/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stencila.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-05T05:21:20.000Z","updated_at":"2022-07-26T20:53:16.000Z","dependencies_parsed_at":"2022-08-31T12:51:23.713Z","dependency_job_id":null,"html_url":"https://github.com/stencila/rasta","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/stencila/rasta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Frasta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Frasta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Frasta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Frasta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stencila","download_url":"https://codeload.github.com/stencila/rasta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Frasta/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265872221,"owners_count":23842145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T18:46:44.973Z","updated_at":"2025-07-19T02:04:20.159Z","avatar_url":"https://github.com/stencila.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌴 Rasta\n\n#### R interpreter for Stencila executable documents\n\n[![Build Status](https://dev.azure.com/stencila/stencila/_apis/build/status/stencila.rasta?branchName=master)](https://dev.azure.com/stencila/stencila/_build/latest?definitionId=12\u0026branchName=master)\n[![Code coverage](https://codecov.io/gh/stencila/rasta/branch/master/graph/badge.svg)](https://codecov.io/gh/stencila/rasta)\n[![CRAN](https://www.r-pkg.org/badges/version-last-release/rasta)](https://cran.r-project.org/web/packages/rasta/)\n[![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://stencila.github.io/rasta/)\n\n## Install\n\nRasta is available as a R package. It isn't on CRAN yet, but you can install it from this repository using the [`remotes`](https://github.com/r-lib/remotes) package,\n\n```r\nremotes::install_github(\"stencila/rasta\")\n```\n\n## Use\n\nRegister Rasta so that it can be discovered by other executors on your machine,\n\n```r\nrasta::register()\n```\n\nIf you have [`executa`](https://github.com/stencila/executa) installed globally, you can then run Rasta using the `execute` command and specifying `r` as the starting language,\n\n```bash\nexecuta execute --repl --lang r\n```\n\n## Develop\n\nGet started by cloning this repository,\n\n```bash\ngit clone git@github.com:stencila/rasta\ncd rasta\n```\n\nThen install the necessary development dependencies,\n\n```bash\nmake setup\n```\n\nMost development tasks can be run from R, using `make` shortcuts, or RStudio keyboard shortcuts.\n\nTask                                                    | `make`                | R/RStudio       |\n------------------------------------------------------- |-----------------------|-----------------|\nInstall development dependencies                        | `make setup`          | `devtools::install_dev_deps()`\nRun linting                                             | `make lint`           | `lintr::lint_package()`\nRun R tests                                             | `make test-r`         | `devtools::test()` or `Ctrl+Shift+T`\nRun C++ tests                                           | `make test-cpp`       |\nRun all tests                                           | `make test`\nRun tests with coverage                                 | `make cover`          | `covr::package_coverage()`\nRun benchmarks                                          | `make bench`          |\nBuild documentation                                     | `make docs`           |\nCheck the package                                       | `make check`          | `Ctrl+Shift+E`\nBuild                                                   | `make build`          | `Ctrl+Shift+B`\nClean                                                   | `make clean`          |\n\n### Testing\n\nUnit tests live in the `tests` folder. Most of the tests are written using the `testthat` package. When writing regression tests for a specific issues, please name the test file accordingly e.g. `tests/testthat/test-issue-1.R`. There is also a `tests/cpp` folder for C++ tests and a `tests/bench` folder for benchmarking.\n\n### Documentation\n\nDocumentation is written using `roxygen2` and the documentation site is generated by `pkgdown` into the `docs` folder and published on GitHub pages at https://stencila.github.io/rasta/.\n\n### Continuous integration\n\nTests are run on [Azure Pipelines](https://dev.azure.com/stencila/stencila/_build?definitionId=12) and code coverage tracked at [Codecov](https://codecov.io/gh/stencila/rasta).\n\n## Notes\n\n- This package has two functions, `stream_read_message` and `stream_write_message`, for reading and writing length prefixed messages from/to streams. These functions are implemented in both R and C++ and there is benchmarking code to compare their performance (run `make bench` and look for the outputs in `tests/bench`). The C++ implementations are 2-3 times faster. However, the times involved are small (\u003c100µs for 10k messages) and having C++ code does add complexity and a dependency (`Rcpp`). Given that, we may remove the C++ implementations in the future.\n\n- This package provides a `StdioServer` class which implements Stencila's execution API over standard input / output streams. It is analogous to the [`StdioServer`](https://github.com/stencila/executa/blob/v1.14.0/src/stdio/StdioServer.ts) class implemented in Typescript in the `stencila/executa` package. A previous version of this repository implemented a [`PipeServer`](https://github.com/stencila/rasta/blob/v0.7.1/R/pipe-server.R) class which used named pipes as the transport. However, this was not used in production, and so in the interest of keeping the code base as simple as possible, was removed. This note is intended for developers who might find a need to use the API over named pipes in the future.\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstencila%2Frasta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstencila%2Frasta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstencila%2Frasta/lists"}