Skip to main content

限界 (Genkai) — pure-Rust structural cross-section analysis & EN 1992 RC/PSC design engine, with a Python API. Every section checked against its limit state (限界状態 · genkai jōtai).

Project description

限界 Genkai — structural cross-sections, pushed to the limit

限界 · Genkai

Structural cross-sections, pushed to the limit.

License: Apache-2.0 Status: pre-alpha Python 3.9+ Rust 1.83+


Genkai (限界, "the limit") is a pure-Rust engine for structural cross-section analysis, exposed through a Python API and a desktop GUI.

It computes the geometric, elastic, plastic, and warping/torsion properties of arbitrary cross-sections (massive or thin-walled, with holes, single- or multi-material), and has grown into a reinforced and prestressed concrete (RC/PSC) section design and verification engine to the Eurocodes (EN 1992).

Why the name. In structural engineering, 限界状態 (genkai jōtai) is the limit state — the ultimate and serviceability limits that the whole of Eurocode design is built around. Every section this engine touches is checked against its limit. And もう限界 (mou genkai, "I'm at my limit") is, roughly, how it felt to name the thing. The name stuck for both reasons.

Status: pre-alpha. Phases 1–5 are shipped (geometry/elastic/plastic/warping replacing sectionproperties, multi-material, thin-wall shear/torsion, and an EN 1992 RC/PSC design engine); Phases 6 (EN 1992 conformance hardening) and 7 (design feature-parity) are outstanding. See the releases for shipped versions.

📖 Documentation: Theory book · Python API guidepip install genkai.

Why

  • Performance — a native, parallel Rust core (single sparse factorization reused across right-hand sides, GIL-free assembly) instead of interpreted Python.
  • Independence — a fully owned, permissively licensed computation stack with no third-party analysis engine.
  • Scope — multi-material sections and RC/PSC design to the Eurocodes, an area not covered by existing open tools.

Architecture

  • crates/genkai-core — pure Rust computation core: geometry, meshing, finite-element warping, and section properties. No Python, no GUI.
  • crates/genkai-py — PyO3 bindings exposing the genkai._genkai extension module.
  • crates/genkai-gui — Tauri v2 desktop backend over the core (serde DTOs). The frontend lives in gui/ (React + Vite + TypeScript).
  • python/genkai — the Python package surface.
  • docs/theory — the theory manual (mdBook): derivations and validation references — read online.
  • docs/api — the Python API guide (mdBook): how to drive the engine, with runnable examples — read online.

At a glance

import genkai

g = genkai.Geometry(outers=[[(0, 0), (100, 0), (100, 60), (0, 60)]])
sec = genkai.Section(g, material=genkai.Material("steel", 200e3, 0.3, 355, 7.85e-9))

geo = sec.geometric()                 # frozen results: .area, .ixx_c, .perimeter, …
solved = sec.analyze(mesh_size=5.0)   # mesh + warping solve, once
warp = solved.warping()               # .j, .cw, .x_se, …
stress = solved.stress(mxx=1e6, mzz=5e4)

Technology stack

Permissive licenses only, enforced in CI by deny.toml:

Concern Crate
Polygon boolean ops geo / i_overlay
Quality meshing spade (constrained Delaunay + Ruppert refinement)
Sparse direct solver faer
Python bindings / packaging pyo3, rust-numpy, maturin
Desktop GUI tauri

Build (developer)

Requires Rust (stable, MSRV 1.83). Building the GUI backend (crates/genkai-gui) additionally needs the frontend bundle, which Tauri embeds at compile time — build it first:

cd gui && npm ci && npm run build   # produces gui/dist (required by `cargo build --workspace`)
cd ..

Then the Rust workspace:

cargo build --workspace      # build the Rust core, bindings, and GUI backend
cargo test  --workspace      # run the Rust test suite
cargo deny  check            # license and advisory gate

The Python extension is built and installed into the active virtual environment with maturin — the recommended developer loop:

maturin develop              # build + install `genkai` (editable) into the active venv
pytest python/tests          # run the Python test suite

To rebuild the extension manually without maturin, build the crate and copy the artifact next to the package using the name for your platform:

cargo build -p genkai-py
# Linux:    cp target/debug/lib_genkai.so   python/genkai/_genkai.so
# macOS:    cp target/debug/lib_genkai.dylib python/genkai/_genkai.so
# Windows:  copy target\debug\_genkai.dll    python\genkai\_genkai.pyd

License

Genkai is licensed under the Apache License 2.0. You are free to use, modify, and distribute it, including for commercial purposes, provided you retain the copyright and NOTICE attribution as required by the License.

Citation

If you use Genkai in academic, professional, or commercial work, please cite it. GitHub renders a "Cite this repository" button from CITATION.cff; attribution in any derived product, publication, or report is requested.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genkai-0.1.1.tar.gz (427.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

genkai-0.1.1-cp39-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

genkai-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

genkai-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

genkai-0.1.1-cp39-abi3-macosx_11_0_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ x86-64

genkai-0.1.1-cp39-abi3-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file genkai-0.1.1.tar.gz.

File metadata

  • Download URL: genkai-0.1.1.tar.gz
  • Upload date:
  • Size: 427.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genkai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c191ba2273acb97c0f69e44d6b31d0ef53321702bb69c6bfcc4a024ea6b48738
MD5 50f64f89e1efac437b8864008a68ba9a
BLAKE2b-256 eef18778aab7d5ac94cae1eff7b6880e6ba22ab44f4940f31be965d2cf31f8fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkai-0.1.1.tar.gz:

Publisher: wheels.yml on Pavlishenku/Genkai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkai-0.1.1-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: genkai-0.1.1-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genkai-0.1.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e023c866ca8d133f27a0e5e38b1fbd393f1b539976d6dd844487e1f94917fbca
MD5 a53e6ae3e53daaacde5b74aa95e6f8c5
BLAKE2b-256 3d7facce9f91555cf769b4e1401f8d0133b4502ee2deac463766258ff828e60b

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkai-0.1.1-cp39-abi3-win_amd64.whl:

Publisher: wheels.yml on Pavlishenku/Genkai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkai-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for genkai-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a420d1cbad152e3282813405eb86cf7df186b8f1fe590603c8db7e676aa51722
MD5 7f8c7476b084bf43d6e99084dc1ca18d
BLAKE2b-256 af8b83c3024117162239b4a65e3675392b1261feceb16cc8af7b223ae08ebf50

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkai-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on Pavlishenku/Genkai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkai-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for genkai-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9a331a82f06be5ec1da91b6e30008e6be7cb509c2ddbef8113fc342e18e79af4
MD5 37b8b8f0ab87a92c14dffc65e9ed716e
BLAKE2b-256 4a8e0c65aae02cfa1af54470f41b865e61f11fc7d05fab5c42b81be90a0562f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkai-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on Pavlishenku/Genkai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkai-0.1.1-cp39-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for genkai-0.1.1-cp39-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 589f11471c8cb9b8df1a4d05cf59878b9b785c046b7882939e0a9300584ecc17
MD5 910b2093a4bdcb913574c2e5eccbee62
BLAKE2b-256 a6789a9ef639b04ca9409849a5229c67e7f0a806a291a40cc2b0e8e6bcc38741

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkai-0.1.1-cp39-abi3-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on Pavlishenku/Genkai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkai-0.1.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for genkai-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a44a52df45920ca87e07e640392f4644f5bcecbec17fce09af0c306972ced815
MD5 4f90ef6d6e77a66d41cf54796d3ef5e8
BLAKE2b-256 66b3c233236175d9cef116a8d8477d5c3e8d911ee269fe854ddd010b366d9262

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkai-0.1.1-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Pavlishenku/Genkai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page