Installation
TTOON 0.1.x packages are not published to PyPI, npm, or crates.io. Public releases provide local-install package artifacts only. Download the matching artifact from GitHub Releases or GitHub Actions, then install from the local file.
- Python
- JavaScript / TypeScript
- Rust
Download the python-wheel-* or python-sdist artifact first.
pip install ./ttoon-0.1.0-*.whl
If you only have the source distribution:
pip install ./ttoon-0.1.0.tar.gz
pyarrow and polars are already declared as package dependencies. No extra step is needed for the normal wheel install.
The current Python package depends on pyarrow>=23.0.0 and polars>=1.37.1.
If you are working from a stripped-down environment, install them explicitly:
pip install pyarrow polars
Requires Python 3.11+. Installing from wheel does not require a Rust toolchain; installing from sdist does.
Download the js-packages artifact first. It contains ttoon-shared-0.1.0.tgz, ttoon-node-0.1.0.tgz, and ttoon-web-0.1.0.tgz.
npm install ./ttoon-shared-0.1.0.tgz
For Arrow table operations, add the optional peer dependency:
npm install ./ttoon-shared-0.1.0.tgz apache-arrow
For custom decimal codecs, install the library your codec uses. Common choices are decimal.js and big.js:
npm install ./ttoon-shared-0.1.0.tgz decimal.js
npm install ./ttoon-shared-0.1.0.tgz big.js
Note:
@ttoon/nodeand@ttoon/webare environment-specific re-exports of@ttoon/shared. If you install them, install the matchingttoon-shared-0.1.0.tgztogether.
npm install ./ttoon-shared-0.1.0.tgz ./ttoon-node-0.1.0.tgz
npm install ./ttoon-shared-0.1.0.tgz ./ttoon-web-0.1.0.tgz
The JS SDK uses a WASM bridge to invoke the Rust core engine. The WASM module is bundled inside the package — no additional setup required.
Download the rust-crate artifact first, unpack the .crate, then consume it as a local path dependency.
mkdir -p vendor/ttoon-core
tar -xzf ./ttoon-core-0.1.0.crate -C vendor/ttoon-core
Then add this to Cargo.toml:
[dependencies]
ttoon-core = { path = "vendor/ttoon-core" }
The ttoon-core crate includes Apache Arrow support by default.
Official SDKs
All SDKs share the same Rust core, ensuring consistent parsing and serialization behavior. The JS packages are split by runtime target, but @ttoon/node and @ttoon/web are thin re-exports of @ttoon/shared.
| Language | Package | Architecture |
|---|---|---|
| Python | ttoon | Rust core via PyO3 |
| JS / TS | @ttoon/shared | Rust core via WASM |
| Node.js | @ttoon/node | Re-exports shared |
| Web | @ttoon/web | Re-exports shared |
| Rust | ttoon-core | Core engine |
Verify Installation
- Python
- JavaScript
- Rust
import ttoon
print(ttoon.dumps({"hello": "world"}))
# hello: "world"
import { stringify } from '@ttoon/shared';
console.log(stringify({ hello: 'world' }));
// hello: "world"
use ttoon_core::{from_ttoon, to_ttoon};
let node = from_ttoon("hello: \"world\"").unwrap();
let text = to_ttoon(&node, None).unwrap();
assert_eq!(text, "hello: \"world\"\n");