What files in a Cargo project should be in my .gitignore?

Summary .gitignore for executable crates # Generated files /target/ .gitignore for library crates # Generated files /target/ # Well, this depends… See below! Cargo.lock Details You can always ignore the target/ folder completely. It only contains generated files (e.g. compile artifacts) and is also usually quite large. If you are developing an executable program, then … Read more

What is an idiomatic way to have shared utility functions for integration tests and benchmarks?

Create a shared crate (preferred) As stated in the comments, create a new crate. You don’t have to publish the crate to crates.io. Just keep it as a local unpublished crate inside your project and mark it as a development-only dependency. This is best used with version 2 of the Cargo resolver. For better performance, … Read more

Is there a list of all cfg features?

The “Conditional compilation” section of the Reference has a list of configurations that must be defined (as of Rust 1.14): target_arch with values like: x86 x86_64 mips powerpc powerpc64 arm aarch64 target_os with values like: windows macos ios linux android freebsd dragonfly bitrig openbsd netbsd target_family with values like: unix windows unix (shortcut for target_family) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)