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.4.0.tar.gz (197.0 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.4.0-cp38-abi3-win_amd64.whl (259.3 kB view details)

Uploaded CPython 3.8+Windows x86-64

tja-0.4.0-cp38-abi3-win32.whl (249.7 kB view details)

Uploaded CPython 3.8+Windows x86

tja-0.4.0-cp38-abi3-musllinux_1_2_x86_64.whl (3.2 MB view details)

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

tja-0.4.0-cp38-abi3-musllinux_1_2_i686.whl (3.1 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ i686

tja-0.4.0-cp38-abi3-musllinux_1_2_armv7l.whl (3.1 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARMv7l

tja-0.4.0-cp38-abi3-musllinux_1_2_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

tja-0.4.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

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

tja-0.4.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

tja-0.4.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

tja-0.4.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

tja-0.4.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tja-0.4.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (3.0 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.5+ i686

tja-0.4.0-cp38-abi3-macosx_11_0_arm64.whl (393.8 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tja-0.4.0-cp38-abi3-macosx_10_12_x86_64.whl (401.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tja-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1bdfd3fbe1ca8174e7749661222e373b4e42905114d7e9da1e937727be67387f
MD5 df02a3cfc298d7cd48421bfd38a034fa
BLAKE2b-256 f1b657b5b7a048649a3771f0b7cb0fc807dda888c49a139ee0d22287c9ce30f0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tja-0.4.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 203e531cce55b8949a48253cb4f248d5d70be2a3e372cf78c42f68236b3425c8
MD5 bcbfc430f4110ecd43f6de78da723ad0
BLAKE2b-256 7597105eeecb0221dbf989f3074954d88292bd5c63a28297e8b9cab88a811d80

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tja-0.4.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 4b14a70b343291492635999cd7f50a76929f8a7eabbe53aefc983ab0fb2a7ada
MD5 e7d755188f24254502d00a07d93569db
BLAKE2b-256 4b41db0ede033d88a9d885cf6a61a115320168e43684726b13177bfaa68c1a93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 39af0a8ca54e117a172b2321da12e332241fa72259c9aaf7a983026c6ad6ff6d
MD5 658ab0cb992e96e108c2d0cc2eec7527
BLAKE2b-256 5a0f02843871c52e2c547a60612f5c305163f6252d862c0cabfb7abefe3bcb77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 890e1b4c8956083d6fac98c96f79ec223627a35697975dc8e2436c7f5cf3f2e7
MD5 db5eea881f93f24dd842cde766756617
BLAKE2b-256 5dc65eb4f9ac06340894c234ee5b625c2820fe0041f2c727fa614e75c69af400

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 3b032a857e72d20bd365b7e8202cd4794143cd85901493d08da44d58ce455155
MD5 0fb4d1365d516c565f3d60b2a2e04d4e
BLAKE2b-256 0b0944d88ed1edcd928f01bd5b4ce9ad45b494b63a3d16abe15b6be4da34d2ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f149ac502a842aa2a02f11745a4621b5f282ac11ece11e361fec76a714687e66
MD5 39c86daf916cd9a18a55c71d72ee75b3
BLAKE2b-256 11d08f5156fcf6e999987471eb8d3f0537e63b041a39b1ba9d33a1a3165e28af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 10332b0f1c03810b4486263b50dae4992c9c022881dc4146a89d5b4b6b878846
MD5 ac27d1a5131bb9fe4da7501803f3d08b
BLAKE2b-256 bcbe5f89a8d98c25bcf33da62672a2205c3d68f180f193636d6d0ffc380870fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 599cc32656b7a7303164d1d46ff510222b850d0512a9560c3c48469630cdf5dd
MD5 0ef734ba74421f217ce7a44c0f0781c9
BLAKE2b-256 2134a62905a4ed784033cbf0716bc710bebdcb04f47fa20c34af1f47606d02ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 269251009d2492092acd3ddd3463b39c8de665268d3f498afdb5de2a5b5a7723
MD5 cddc98437744da94634d76765089c612
BLAKE2b-256 eddf5eab70cbcfbbfeb56a55f2d85028edb820f862d71ec6ddbb400afa96aa06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 d6cc71eca72d10ea249647536ebc6713fbf8d648134f00cede13aa4bf903e6df
MD5 0ebba16ea014eeda458d7bd0806d4c03
BLAKE2b-256 55d03134a83d54c7c2f88478d36c07f100ce907d1fc5db18bd9351a645c149b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7f66c4b6c6110c67e1fb95396bca6305b87c5a59c58091c3bd492fbfd592745c
MD5 f0de70b2928f88bf08791655b9fa13de
BLAKE2b-256 a1db7865f973e2b6bf5ba34268fd62775fa69840556d327a5da41b6ac21b228f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 e6eed1ff6916b34ef2f2eb5e7d46e9e955513b54adfc948e154ebc02daed9859
MD5 4463ff281637714c78e08caa88927348
BLAKE2b-256 77bb27a74da685d59d1f1891afac4ccc1b6b3f2f1a320a92853932fbe66a692a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 40d5db55d0de4d93d8aec68878892168050974ce460dad6ecd58a5d62e93d56c
MD5 6cd44f1d05ee5344fc52150f61009402
BLAKE2b-256 a02fb0e2982d7c8ca7b0c475d1e702ced3e5dfcfe54d75a3e25e2592fb5e4016

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.4.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 83bbb2469e673717636b0ffafb39057be1d71208a7804b4b2038d890b7f742b0
MD5 d761cac51c5aba8b35f93679746d29e4
BLAKE2b-256 187e0e4e9342d29fb9a52bdf7f97674e78d248a4e24400544f581c379d2063ac

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