Skip to content

accelbread/flakelight-rust

Repository files navigation

flakelight-rust

Rust module for flakelight.

Initializes a Rust project flake from its Cargo.toml.

Configured options

Sets package to the crate at the flake source. description and licence is set from Cargo.toml.

Adds rust-analyzer, cargo, clippy, rustc, and rustfmt to the default devShell and sets RUST_SRC_PATH.

Adds checks for crate tests and clippy warnings.

Configures rs files to be formatted with rustfmt.

Options

fileset configures the fileset the package is built with. To use all files, set it to ./.;

Getting started

To create a new project in an empty directory, run the following:

nix flake init -t github:accelbread/flakelight-rust

Existing projects can use one of the example flake.nix files below.

Example flake

You can call this flake directly:

{
  inputs.flakelight-rust.url = "github:accelbread/flakelight-rust";
  outputs = { flakelight-rust, ... }: flakelight-rust ./. { };
}

Alternatively, add this module to your Flakelight config:

{
  inputs = {
    flakelight.url = "github:nix-community/flakelight";
    flakelight-rust.url = "github:accelbread/flakelight-rust";
  };
  outputs = { flakelight, flakelight-rust, ... }: flakelight ./. {
    imports = [ flakelight-rust.flakelightModules.default ];
  };
}

About

Rust module for flakelite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published