This project was bootstrapped by create-neon.
NodeJS native addon library written in Rust providing functions for decoding binary/wire formats from the Stacks blockchain. This includes Clarity values, transactions, post-conditions, Stacks and Bitcoin addresses, and more. All of which use ASM/SIMD where available.
- Linux (glibc) x86_64
- Linux (glibc) aarch64
- Linux (musl) x86_64
- Linux (musl) aarch64
- MacOS x86_64
- MacOS aarch64
- Windows x86_64
The directory structure of this project is:
/ ├── Cargo.toml # The Cargo manifest file ├── package.json # The npm manifest file ├── native/ # The Node addon modules built by this project, these are dynamically-linked shared objects ├── src/**/*.rs # Directory containing the Rust source code for the project |── index.ts # Typescript definitions for the js interface exposed by the Node addon |── loader.js # Script to determine which addon file to load based on the executing target platform |── loader.d.ts # Type defintions for the functions exported by the Node addon |── builder.js # Script to build the native Node addon for the executing host platform ├── tests/*.ts # Js/ts unit tests, primarily testing the Neon (rust<->nodejs) interop layer └── perf-tests/ # Scripts to run performance benchmarks used by commands in package.json
The Rust source code inside the src/**/deserialize.rs
files are responsible for deserializing the Stacks blockchain wire/binary formats defined in SIP-005.
The Node addon modules for all supported platforms are compiled by CI and bundled inside the npm package. The native binary files are small enough that the bundled npm package is an acceptable ~20 MB in size.