Skip to content

Typescript, Rust, Turborepo, Yarn Quickstart Boilerplate

License

Notifications You must be signed in to change notification settings

nobu-sh/typescript-rust-turbo

Repository files navigation

Typescript Rust Turbo Boilerplate

A quickstart boilerplate for a Turbo monorepo with Yarn Berry. I originally made this template for SerenityJS. We needed a centralized solution where we could keep packages made in TypeScript and packages made in Rust using napi-rs to expose node engine binaries.

Instead of the traditional /apps directory we only needed launcher and docs app so we kept them in the root. This should be relatively easy to change back if you fancy that more.

Prerequisites

Before you begin, ensure that you have the following tools installed on your system:

  • Yarn - Package manager of choice.
  • Node - Version ^20 recommended.

Usage

  1. Clone the repository:
git clone https://github.com/nobu-sh/typescript-rust-turbo.git
  1. Open the project in VSCode using the typescript-rust-turbo.code-workspace file located in the .vscode directory.

  2. In the root directory and run yarn to install and link all workspace dependencies.

  3. GLHF...

Creating a new Package.

This has been made relatively simple. Running yarn new in the project root will take you through a setup powered by Turbo Generators.

Vercel Remote Caching

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

Login to your Vercel account by running:

npx turbo login

Then link the project by running:

npx turbo link