Skip to content

feat: faker2-rs — Rust-backed Python package (PyO3 wrapper) - #11

Merged
jqueguiner merged 3 commits into
masterfrom
feat/rust-backed-pypi
Jul 15, 2026
Merged

jqueguiner merged 3 commits into
masterfrom
feat/rust-backed-pypi

Conversation

@jqueguiner

Copy link
Copy Markdown
Owner

native/ adds faker2-rs: a thin Python wrapper over the Rust faker2 engine (PyO3/maturin). All fake-data generation runs in Rust.

from faker2_rs import Faker, homophones, detect_country, infer_gender_real
f = Faker(42)
f.name(); f.first_name_like_real("Jacques", "FR")
homophones("Dominique", "FR", "balanced")
  • Seedable Faker class + stateless name-intelligence helpers.
  • Self-contained wheels: dataset bundled into the package and located at runtime (new FAKER2_BALANCED_PARAMS env override alongside FAKER2_NAMES_PARQUET).
  • wheels.yml: abi3 wheels for Linux x86_64/aarch64, macOS Intel/ARM, Windows → attached to the Release, PyPI on token.

Scope: wraps the current Rust port (core + en_US + 139-country name intelligence). Remaining locales port onto the same engine incrementally; the legacy pure-Python faker2 is untouched.

🤖 Generated with Claude Code

jqueguiner and others added 3 commits July 15, 2026 19:49
Add native/: a maturin/PyO3 project exposing the Rust faker2 engine to Python
as the `faker2_rs` package. All generation runs in Rust; Python is a thin
wrapper.

- native/src/lib.rs: #[pymodule] `faker2_rs._native` with a seedable Faker
  class (name/email/address/... + first_name_real / first_name_like_real /
  name_of) and stateless helpers (infer_gender_real, detect_country,
  homophones, available_countries).
- Self-contained wheels: the dataset is bundled into the package and located
  at runtime; rust gains a FAKER2_BALANCED_PARAMS env override (matching
  FAKER2_NAMES_PARQUET) so the bundled data is used.
- .github/workflows/wheels.yml: build abi3 wheels for Linux (x86_64/aarch64),
  macOS (Intel/Apple Silicon) and Windows via maturin-action; attach to the
  Release on tag and publish to PyPI when PYPI_API_TOKEN is set.

Scope: wraps the current Rust port (core engine + en_US providers + the
139-country name intelligence). More locales port onto the same engine over
time; the legacy 130-locale pure-Python faker2 is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…runs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…er2 sdist

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jqueguiner
jqueguiner merged commit 0e078a8 into master Jul 15, 2026
37 checks passed
@jqueguiner
jqueguiner deleted the feat/rust-backed-pypi branch July 15, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant