Skip to main content

TJA file parser written in Rust, working in Rust, Python, and WebAssembly.

Project description

tja-rs

An efficient TJA file parser, written in Rust, that supports Rust, Python, and WebAssembly environments.

It is highly optimized for speed and includes features such as a synthesizer for synthesizing music along with don/ka sound effects from a TJA file.

It's fast! (Parse thousands of TJAs in less than 1 second) Check out the benchmark.

You can also use different parsing modes (e.g. metadata-only or metadata-and-header mode) to make it even faster.

Building Instructions

Rust

The Rust target requires no additional feature flags.

To build the library, run:

cargo build

To build the CLI tool, run:

cargo build --bin tja

Python

We use maturin to build the Python package. The Python package requires the python feature flag to be enabled.

To build the Python package .whl, run:

maturin build -F python --release

To develop and test, run:

maturin develop -F python

Python virtual environment is necessary. (e.g. conda, micromamba, poetry, pixi)

To navigate variable, please check tja.pyi

WebAssembly

We use wasm-pack to build the WebAssembly package. The WebAssembly package requires the wasm feature flag to be enabled.

To build the WebAssembly package, run:

wasm-pack build --features wasm

Performance Benchmarks

The parser is highly optimized for performance.

It can parse a typical TJA file in under 1 ms in full mode, and in metadata-only mode in under 5 µs.

For detailed benchmarks and comparisons, check out our benchmark report.

To run the benchmark:

cargo bench

Synthesizer

The TJA parser includes a synthesizer binary that can synthesize music along with don/ka sound effects from a TJA file:

cargo run -F audio --bin synthesize <TJA file> <music file> <don sound file> <ka sound file> --course <course> --branch <branch>

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

tja-0.3.4.tar.gz (195.1 kB view details)

Uploaded Source

Built Distributions

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

tja-0.3.4-cp38-abi3-win_amd64.whl (225.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

tja-0.3.4-cp38-abi3-win32.whl (217.7 kB view details)

Uploaded CPython 3.8+Windows x86

tja-0.3.4-cp38-abi3-musllinux_1_2_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

tja-0.3.4-cp38-abi3-musllinux_1_2_i686.whl (3.0 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ i686

tja-0.3.4-cp38-abi3-musllinux_1_2_armv7l.whl (2.9 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARMv7l

tja-0.3.4-cp38-abi3-musllinux_1_2_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

tja-0.3.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

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

tja-0.3.4-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

tja-0.3.4-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

tja-0.3.4-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.7 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

tja-0.3.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tja-0.3.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (2.8 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.5+ i686

tja-0.3.4-cp38-abi3-macosx_11_0_arm64.whl (355.6 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tja-0.3.4-cp38-abi3-macosx_10_12_x86_64.whl (363.8 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file tja-0.3.4.tar.gz.

File metadata

  • Download URL: tja-0.3.4.tar.gz
  • Upload date:
  • Size: 195.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.2

File hashes

Hashes for tja-0.3.4.tar.gz
Algorithm Hash digest
SHA256 7991d61846c09516bb605749e779cc00f4253036e8c5f514dfe1a395c36b72b5
MD5 a8fac2eb2ca9dd40d7bba22f08f6e2c8
BLAKE2b-256 fc7cef5730ce4a7639efd08ed0811efe7ab5f8e256ab4c530ef96433fd8ac725

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: tja-0.3.4-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 225.9 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.2

File hashes

Hashes for tja-0.3.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 640026da94c73ed39cf6d39fbcb171cafbb91e7d613d83220e188ad645e7f613
MD5 90beaba1749057c5f71a15453e0fd332
BLAKE2b-256 54374902286afe1e5a090a9f155ef874ea5b65cb60fce065afb7a91218712a4a

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-win32.whl.

File metadata

  • Download URL: tja-0.3.4-cp38-abi3-win32.whl
  • Upload date:
  • Size: 217.7 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.2

File hashes

Hashes for tja-0.3.4-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 e5ed863ae0e4a3f0dd752575690ebf4bb1191474a3e7459ed59644e94403bf53
MD5 87970367ee6913128ac0133ffe347771
BLAKE2b-256 2267896ffeb176a978babe9ed76fbc564032665a3ceb0aa8dcd513c210312d76

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a470035b3ad8df58a609b494f2228d5d9903150d6d23635e131ad1ab963c5e7d
MD5 543a3ff01e55bbae231b04811679ce00
BLAKE2b-256 70ccfb15f7c10800e9884e4827bba1d7d30594d4704884d35409b1cc8215db9a

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-musllinux_1_2_i686.whl.

File metadata

  • Download URL: tja-0.3.4-cp38-abi3-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.8+, musllinux: musl 1.2+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.2

File hashes

Hashes for tja-0.3.4-cp38-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 752e49ec61db2528b186e3dba1837cb2c32cc8a402415bf267ff78a5cc42c945
MD5 08683c8957665731270c9d395f1b336d
BLAKE2b-256 ae8edf01c9de45a12cf7b431dc1acc64dc8e6ec6fd754080c0616ebdc5bcbf6c

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 4143faac0982c36593efa8448c7a45b7e3fd548bd377739429ef1d6bb2f43e42
MD5 9a65fb4e3064397d625cd55c58e0a0d1
BLAKE2b-256 2a5e023b4972a2b3b8e15541605d9ce607f24801d04ba05cc68dd0bcdf743b02

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b56bdbe100ee04e9756b448519ada6c69d0a1fb546d38164db75845e5bf942a2
MD5 42ff850158ab55d227847cb4b321816a
BLAKE2b-256 0dc674e413790dea4ea326f78c5dc7ee41d32469fe8b4a4bb94e0449aedf7839

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3451d90b7d506db9879dac70193c18b3539f5293fc830b7640c6d879135fbeb4
MD5 67e7a1f202c43ff55a7403b5d04bee99
BLAKE2b-256 b49f7f3090b67cd24262aa774ee9bdf598de17af6e8cebfa659fd19671ceca8d

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 73060b467fa9fd0018bdb1881dda3d59f7525f4fabe1d4c22886163ad01b6296
MD5 1b87f7ab230372d96eb3e455b4737aec
BLAKE2b-256 3d278c07b769c78d6505243360f25259abfd22ccba8f7287c7b08e44a59c5feb

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 27b5edf8b1b6ae5dbca688760ada3b4766c42fe740a1702b85d3f48dd4aea188
MD5 1b8d8ee4a8535c37481bd49235cc4412
BLAKE2b-256 ce2a7d0b88e91d795070d2d65553f39d1b35ffb4d560b2735d2234f0f32b178d

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b749d2b39f6c8630d36a4f1f3565be45f49fdbc20436a56646e1b9e5bff2fbec
MD5 b01556b037686f5fc768874c46ad03cb
BLAKE2b-256 6956700b64c75dfc34be65df10d714cbae0a4a386b058bb71b90c9f67900a86a

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6c84b71b55d04926c633df98e6d4df6620ae45cf0078dcb1b1c6d0c46b970d08
MD5 20aa73874b7c69f56d83532aa6d62e5d
BLAKE2b-256 39270b4451555c898c63699a21da38be0cfb56e402e1bdf11968fc4e623bcf06

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 120c1d1df46d39fcd2545ab67e01223388965294c751ea94017e43988f59389b
MD5 f7eaed11d22014ed21e7a02bce9a108f
BLAKE2b-256 390b17179fddfe4bc2d3035e4919ec8d0aa03b70dd52da69d95e3a12156f2a8e

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76ec4fc7d1d3f1b4fd28efb8881c811bd406e7dbff9ed2572773b2a27cd0d054
MD5 d418b88632491541f527183b6f23e68a
BLAKE2b-256 42784ad00ee679052dc05a37dae13788f2d39ceb503c287bcf7f6fd3980c6f55

See more details on using hashes here.

File details

Details for the file tja-0.3.4-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tja-0.3.4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 35e101704f556c5cd78436bbef86ed6e8b6acc2dc0e890587554223fb93cea6a
MD5 3ab580c397b52ded8d329c1c66468692
BLAKE2b-256 f1de4f46024613faa53e2be572df4d8d0a5319916040bfed5912e3e7354d2c0d

See more details on using hashes here.

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