A Rust library and CLI tool for generating realistic fake data in multiple languages, with support for struct derivation and locale-specific fakers.
Fake is a Rust library and command-line tool designed for generating realistic fake data. It solves the problem of needing placeholder or test data by providing a wide range of generators for names, addresses, text, numbers, and more, with support for multiple languages and locales.
Rust developers who need to populate test databases, create mock APIs, generate sample datasets, or write tests that require realistic fake data.
Developers choose Fake for its extensive feature set, multi-language support, and seamless integration into Rust projects via both library and CLI, offering greater flexibility and realism compared to basic random generators.
A library for generating fake data in Rust.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports over a dozen languages including English, Chinese, and Arabic, enabling realistic fake data for international applications, as detailed in the README locale table.
Automatically generates fake data for custom structs using #[derive(Dummy)] with customizable field fakers, simplifying complex data synthesis, as shown in the Foo and Bar struct examples.
Includes fakers for names, addresses, internet data, dates, and more, covering a wide range from personal info to technical specs like IP addresses and UUIDs.
Provides a standalone CLI tool for quick data generation from the terminal with locale and repeat controls, useful for scripting and ad-hoc tasks, demonstrated in the shell examples.
Integration with popular crates like chrono or uuid requires enabling optional features, adding configuration overhead and potential dependency conflicts, as noted in the installation section.
The comprehensive locale support and structured generation can be slower than basic random generators, impacting performance in data-intensive scenarios or tight loops.
Using derive macros and custom fakers requires understanding of Rust's trait system and macros, which might be challenging for developers unfamiliar with these concepts.