Skip to content

Commit cec394f

Browse files
authored
Merge pull request #72 from darrenldl/wasm
Added WASM build source files, progress toward publishing to NPM via Travis CI
2 parents 3b44858 + 0be0d40 commit cec394f

File tree

8 files changed

+459
-2
lines changed

8 files changed

+459
-2
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/target/
2-
Cargo.lock
2+
/Cargo.lock

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ after_success: |
4545
echo "Uploaded code coverage to Codecov" &&
4646
for file in target/debug/reed_solomon_erasure-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
4747
echo "Uploaded code coverage to Coveralls"
48+
49+
deploy:
50+
provider: npm
51+
api_key:
52+
secure: "a+NsGhDychhcdKHiJGGOLw95vHJDg4h2uOnGKG2EcziCeNExibgEKAP6YHz5TC15Ezhvs6cA3hQMgVVE5Gb7Xxs70PH2YjixndcKMJcYtPI8Z1JmCNFm7tySKvxYdI3X3KVpgiMeoT8gk2z4hCNw/LRhK/h6HO4aP5+3+MXE3daBFyxFKv8RuxHz0Bm6miFh2thvNpFj3wTdLuS5aReyHiExGubNA5dFdx+6zQrpFggGwY1JIoVOF8ayJY2DZAiV3RsitAvZNaIBjOsD8kToM5cyVanyt/iMlpmV36s2wx9lqvUtGKWCAw4AbxC9QBNAXL/lBLuZlEpvyzoY3eQKFsORL+9h6B3ZQSTmCe7Hul/subtTxECkHM9M5QM0pIavt2AH3FE2zUNnSjR26gqeWyODCfE8rPBvkJlRGO2uU1ygHMopjt1ekC1sjDksntVrSqLl7EDr6+K66v5wsbAFoFjqNjBIv0WUPWDsEV38JDdX/3Caii+EOvNe4iEqsdPIcI519qhKUC3IFc6Xc/NXMfuKR4oWSc6fzahIwum/6joQ1QpO0ors9LA+cWptJn8AVy8o1QljNk9u6QDFjWEA+FI1a0moty0uUmPXbcbAE6Vxbd6GEDoz2V3wC5mBaOzL1CsGSql2iBg+PYGyDAXcPtiVgpNSYWQ9nUuhfyX5bV4="
53+
on:
54+
tags: true
55+
skip_cleanup: true

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
Rust implementation of Reed-Solomon erasure coding
1111

12+
WASM builds are also available, see section **WASM usage** below for details
13+
1214
This is a port of [BackBlaze's Java implementation](https://github.com/Backblaze/JavaReedSolomon), [Klaus Post's Go implementation](https://github.com/klauspost/reedsolomon), and [Nicolas Trangez's Haskell implementation](https://github.com/NicolasT/reedsolomon).
1315

1416
Version `1.X.X` copies BackBlaze's implementation, and is less performant as there were fewer places where parallelism could be added.
@@ -17,7 +19,11 @@ Version `>= 2.0.0` copies Klaus Post's implementation. The SIMD C code is copied
1719

1820
See [Notes](#notes) and [License](#license) section for details.
1921

20-
## Usage
22+
## WASM usage
23+
24+
See [here](wasm/README.md) for details
25+
26+
## Rust usage
2127
Add the following to your `Cargo.toml` for the normal version (pure Rust version)
2228
```toml
2329
[dependencies]
@@ -113,6 +119,11 @@ Many thanks to the following people for overhaul of the library and introduction
113119

114120
- Robert Habermeier [rphmeier](https://github.com/rphmeier)
115121

122+
#### WASM builds
123+
Many thanks to Nazar Mokrynskyi [nazar-pc](https://github.com/nazar-pc) for submitting his package for WASM builds
124+
125+
He is the original author of the files stored in `wasm` folder. The files may have been modified by me later.
126+
116127
#### Testers
117128
Many thanks to the following people for testing and benchmarking on various platforms
118129

wasm/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target/

wasm/Cargo.lock

+187
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wasm/Cargo.toml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "reed-solomon-erasure-wasm"
3+
version = "0.2.4"
4+
authors = ["Nazar Mokrynskyi <[email protected]>", "Darren Ldl <[email protected]>"]
5+
edition = "2018"
6+
repository = "git://github.com/darrenldl/reed-solomon-erasure.git"
7+
license = "MIT"
8+
9+
[dependencies]
10+
reed-solomon-erasure = { version = "4.0", path = ".." }
11+
wasm-bindgen = "0.2"
12+
wee_alloc = "0.4.4"
13+
14+
[lib]
15+
crate-type = ["cdylib"]
16+
17+
[features]
18+
default = []

0 commit comments

Comments
 (0)