Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.25 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.25 KB

Building Rust with Buck

This is simple demo/playground project to play with buck2.

Buck buck is a build tool designed for multi-language mono-repositories.

In this repository we are going to provide the toolchain with flake.nix over nix develop . which provides the buck2 executable too. We build a simple Rust executable in src/main.rs with dependencies in a Cargo.toml file. The build tool buck needs these dependencies converted to buck build files, which is done with reindeer.

Requirements

  • Nix Environment see here.
  • [optional] direnv installed.

Build the Project

If you have direnv installed it will load the development shell from the flake.nix. when you enter the repository, otherwise do the following:

nix develop .

Build with Buck2

Convert the external dependencies to buck:

just buckify

See all targets with

buck targets //...

Build and run a target with

buck run //src:main

Inspirations