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.5.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.5-cp38-abi3-win_amd64.whl (227.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

tja-0.3.5-cp38-abi3-win32.whl (220.2 kB view details)

Uploaded CPython 3.8+Windows x86

tja-0.3.5-cp38-abi3-musllinux_1_2_x86_64.whl (3.1 MB view details)

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

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

Uploaded CPython 3.8+musllinux: musl 1.2+ i686

tja-0.3.5-cp38-abi3-musllinux_1_2_armv7l.whl (3.0 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

tja-0.3.5-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.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

tja-0.3.5-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.5-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.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tja-0.3.5-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (2.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.5+ i686

tja-0.3.5-cp38-abi3-macosx_11_0_arm64.whl (357.1 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tja-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl (368.2 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tja-0.3.5.tar.gz
Algorithm Hash digest
SHA256 ac44a67440ac911119f4c877446d46b395219d2a4a7f2b27f6043e8e214aa8d5
MD5 fec4c7b2acf681eb5fda6940643975e1
BLAKE2b-256 bd65413f77f05872cae4ebed29f44d933c2cbb139a89061b5c395ad6b033cab8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tja-0.3.5-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 295c240953f66db5e534ac18f78d70198506f7288e1d5c7d00edb99878e558d4
MD5 2dab3114200a0b5a33359fc935a38fe4
BLAKE2b-256 64e3cf643312febc6a579c61114886c2d7eb8b5ef219dc66de00beefac797493

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tja-0.3.5-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 0c973cb5ec5974c13bdc7480f60511ae62232df9b9cd908041c9215fd0c8eeb2
MD5 d2ed354be61a4f3cc02532a2bfdcb5bd
BLAKE2b-256 58aee8ed43fe38f7be42e536bc8e0d0a8707e6488e27c2f90f10aabfdf2a93db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 afe3c57708070b53425764f5072f7cfe552ae41f4dda4725bed51db02f50670d
MD5 8e0dff3971e2a2af55ef71d494f6d16f
BLAKE2b-256 7e6c1611c70f2755e7988fc1176f1b0e19d4d3ea020cdd1428b666cf57325e36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tja-0.3.5-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.3

File hashes

Hashes for tja-0.3.5-cp38-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 9459412e2e26d8e9ef96fdd0f1cc318ca5ae24b5420b5c6874e3b25b9cf91383
MD5 2fbac04cf1d3b54418891fa3a11f4fed
BLAKE2b-256 8f22a5da3d709cb00665e13fb468a7e8db2331fd6993fdd082a3d139d065276f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 27a4f3bcb13433ed2ce84ac93b11d273dab531a7752d5d769bb12ce31f41d079
MD5 6ea9f9d2d37903ee8d716c51467c9c77
BLAKE2b-256 42d9de7a1912208857122660bb42440cb9fe74bb05197616311701d2c62038e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9fc68cf025516a1b00cb10a6fe7fd2e489fb1bce56e6597bb95c7a4f0f21a703
MD5 2b37709f678265acd1ff655b9040a118
BLAKE2b-256 a9a2cc662c8aefd74de11328825d52595a7902a097c420b720128701f4266e13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8833047a8126912a4a3a6b445c7a7cea09e9fe85bd10e0255d3020f9a8d7ef04
MD5 4970b51d40a61f8fbb0334a377ac5653
BLAKE2b-256 35ed459a665e53b45929de7f22c127a19719c300ce2fbb21276c31a2dfa9e4f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 18fe5eb57b59824d86e92c8234693c5352e3bc8d42747e54b64bdea71a6a804b
MD5 3f54e34633e253725b72c05ff6fc7d0e
BLAKE2b-256 4596f1a60b35a8e52d41e80a64cfaf17b861a24a5527f8ecfd819187a69a961f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a2181f82a0ad496bb2682b6f6eb64228bc57587db8ad418c34034996d55f7ff9
MD5 d968b4d888a724b59387c8eec1b12e65
BLAKE2b-256 1418c647980433ffce022050501600199daf254b330b98ae6ea5961d45365090

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 20627cd64dd785b8134d8b6e29eb314c3bfabfa7ad0afbe306e426691cf41221
MD5 deb6c421f3edf979ef53fecdf9309c36
BLAKE2b-256 08bd5395898ba92f2fd3fbd8d1cef3060b21d1cb3b4aaa1d9af1751c09c6b6c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6d532d426e5119531914ba14da57fa606f415c8e47f821e2c348608c2cedff25
MD5 714d3255e83856bbf4ad35dec3c42133
BLAKE2b-256 233cd18f71c646c3b8847bd7374364f76ccbb63782e4a872052daad09ccb5ecd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 916e72346e81dd288955e435b845b589e3698a027b3ca13388218fe34d819c6b
MD5 7e1d2c21ee3e123a0d5e50bca0c292c6
BLAKE2b-256 2481e1e1c13c8b13b0fa15d7a487c00320766b43d0fa2fe3b848fd3cb0197e07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3249e458f7ed1724ef43a595feefadbe1f0abac6021b7772d02bf7e9f13d335d
MD5 492b08bea8eb238a16717e6449ef07db
BLAKE2b-256 6387b089f8532458c3e1a3147b79957fa9e41540f2a3d3ac213b818434bc4077

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tja-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b599019476678a0c851582dcc2aa0a1a36e94dd45d369db2e5586262c57fed87
MD5 ef56d7484ebb5c47ec80829ccd7f90e8
BLAKE2b-256 c5aab6acfcdbaf4ad2cbc460bf6fba34a27e1bc7ca8ea298e262898fda6569d3

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