Parse lithtech file (dtx/ltb/dat) with wasm/napi for Node.js/Deno/Browser.
pnpm add @ylcc/lithtech-parser
After pnpm build
command, you can see lithtech-parser.[darwin|win32|linux].node
file in project root. This is the native addon built from lib.rs.
With ava, run pnpm test
to testing native addon. You can also switch to another testing framework if you want.
- Install the latest
Rust
- Install
Node.js@16+
which fully supportedNode-API
- Run
corepack enable
- pnpm
- pnpm build
- pnpm test
And you will see:
$ ava --verbose
✔ sync function from native code
✔ sleep function from native code (201ms)
─
2 tests passed
✨ Done in 1.12s.