November 30, 2026

![Josiah Parry](https://ricochet.rs/author-avatars/parry.png)Josiah Parry

# The tiny rust library that keeps ricochet safe

Introducing crostini 🥖

[rust](https://ricochet.rs/blog/tags/rust/) [security](https://ricochet.rs/blog/tags/security/)

Share

As a data science deployment platform, `ricochet` enables developers to deploy, execute, and run arbitrary code at scale.

Doing this, though, is inherently dangerous. A malicious, R, Julia, or Python script could delete important files, send sensitive information, or a plethora of other bad-actor behaviors.

To keep your code safe, we created a tiny Rust library called [`crostini`](https://github.com/ricochet-rs/crostini) 🥖.

![A toasted crostini topped with tomato and basil](https://ricochet.rs/blog/2026-11-30-crostini/crostini-logo.svg)

## Quarantine everything! 🧼

Ricochet keeps you, your code, and your organization safe by running every single process in isolation. Each app and task can only see the files it was deployed with. This means that each Shiny app in R, Julia script, or Python API can’t go snooping around.

Ricochet supports 3 different backend engines:

-   [Host](https://docs.ricochet.rs/latest/admin/installation/1-host/)
-   [Kubernetes](https://docs.ricochet.rs/latest/admin/installation/3-kubernetes/)
-   [Container](https://docs.ricochet.rs/latest/admin/installation/3-kubernetes/) ([Podman](https://podman.io/) or [Docker](https://www.docker.com/))

“Host” means it creates processes on the machine that `ricochet` is installed on. On Linux hosts, we run everything in an isolated, [**rootless**](https://github.com/opencontainers/runc/#rootless-containers) container runtime **written in safe Rust**.

## Zero dependency containerization

We’ve spent _a lot_ of time and energy making sure we run your code safely, quickly, and with as little configuration as possible.

Normally, running a rootless container requires an external system dependency such as Docker or Podman. Ricochet, however, is completely **dependency-free**.

To do this, we built a runtime from scratch that creates rootless containers natively. We based our runtime on [youki](https://github.com/youki-dev/youki), a pure-Rust and [OCI-compliant](https://github.com/opencontainers/) runtime. This enables us to create a secure, rootless, environment without any external platform configuration.

## Forking with Crostini

To create a rootless runtime on Linux you have to created a [“forked”](https://man7.org/linux/man-pages/man2/fork.2.html) process. A typical new process can see (almost) everything. When we create the forked process we give it the process ID (PID) of 1. The PID 1 is a special process that owns _everything_. This new process thinks it is the `init`(ial) process cannot see anything else. Creating a forked process, in essence, hides everything from the new process.

![The host's process list next to the container's, where crostini is PID 1 and R is its only child](https://ricochet.rs/blog/2026-11-30-crostini/process-tree-light.webp)

![The host's process list, where ricochet starts crostini and crostini starts R](https://ricochet.rs/blog/2026-11-30-crostini/process-tree-host-light.webp) ![The container's process list, where crostini is PID 1 and R is its only child](https://ricochet.rs/blog/2026-11-30-crostini/process-tree-container-light.webp)

This is where crostini, our tasty morsel of pure rust, comes in. The industry standard is to use tools such as [`tini`](https://github.com/krallin/tini) or [`catatonit`](https://github.com/openSUSE/catatonit) to do this isolation. That, though, requires shipping and orchestrating an external dependency which we’d like to avoid whenever possible!

You maye have seen a `Dockerfile` that looks like so:

docker

```docker
ENTRYPOINT ["/tini", "--"]

CMD ["/your/program", "-and", "-its", "arguments"]
```

This wraps `/your/program` using `tini` which manages the process. `crostini` does this in our compiled rust binary instead—thus, no external depencies needed!

## Cleaning up the crumbs

After creating the forked process, the underlying process thinks it is the _only_ one. Because of that, it ignores any incoming signals. `crostini`’s only job, then, is to babysit the existing process and takes on the responsibility for handling any incoming signals, forwarding them, and appropriately terminating the underlying process.

![ricochet sends SIGTERM to crostini, which forwards it to R, reaps R after it exits, and returns the exit code](https://ricochet.rs/blog/2026-11-30-crostini/signal-sequence-light.webp)

This deceptively simple and small crate gives us the confidence to enable developers to deploy anything they’d like while protecting the underlying host.

## Deploy your own

Ricochet puts apps, APIs, and reports written in R, Julia, and Python into production. Schedule a demo and we'll show you how to deploy and scale your own.

[Schedule a demo](https://ricochet.rs/contact/?reason=demo)



[See pricing](https://ricochet.rs/pricing/)

---

Source: https://ricochet.rs/blog/2026-11-30-crostini
