#accounting #money #finance #cratchit

nightly cratchit

A package for managing accounting data

3 releases

0.0.4 Oct 30, 2018
0.0.3 Oct 30, 2018
0.0.2 Oct 29, 2018

#31 in Value formatting

Download history 157/week @ 2018-11-12 135/week @ 2018-11-19 72/week @ 2018-11-26 22/week @ 2018-12-03 33/week @ 2018-12-10 26/week @ 2018-12-17 2/week @ 2018-12-24 8/week @ 2019-01-07 4/week @ 2019-01-14 2/week @ 2019-01-28 4/week @ 2019-02-18

44 downloads per month

MPL-2.0 license

54KB
236 lines

cratchit

Build Status Coverage Status Documentation Status

A Rust-based library for handling accounting data.

Building

There are two methods of building. The first is building natively, which allows you to run tests locally. To build natively, run:

cargo build

To build the wasm module, you need to first install the necessary prerequisites:

# We use nightly rust for a few features
rustup default nightly

# Install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

# Install the latest npm (if you don't have npm installed, then you'll need
# to do this first. It comes with nodejs, so however you want to install nodejs
# on your system is probably fine)
npm install npm@latest -g

Once the prerequisites are installed, you can run:

wasm-pack build

Testing

If you compiled the native code, you can run the unit tests with the command:

cargo test

To test the wasm module, we have a very small test application in www. You will need to set it up locally on your machine. To do this, run:

# First, make sure the wasm package is linked within npm
cd pkg
npm link

# Now, install npm dependencies and make sure we can see the cratchit wasm
# module
cd ../www
npm install
npm link cratchit

You should now be able to run:

npm start

within the www subdirectory, which will spawn a webserver at localhost:8080 that you can navigate to within a web browser to test the wasm module.

Dependencies

~2MB
~30K SLoC