Skip to content

gabyx/rs-buck-playground

Repository files navigation

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

About

Rust project with external dependency built with Buck2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published