blueb.js - very simple neural network framework npm package, powered by wasm.
Underhood blueb.js uses my C stb style single-header blueberry.h library as neural network framework, as well as some other utility C libraries such as lemon.h and peach.h, for memory allocations and linear algebra functionality respectively.
Higly inspired by tsodings nn library github.com/tsoding/nn.h
Sadly this time blueb.js is a NEW javascript framework btw.
- Live demonstration of a web application what uses blueb.js maksasj.github.io/nnate
- Node package page npmjs.com/package/blueb.js
- Source code avaiable at github.com/Maksasj/blueb.js
- blueberry.h and other C libraries source code github.com/Maksasj/caifu
-
Build manually
First of all requirements:- Clang 14.0.0
- wasm-ld
- Node (Have test with Node v20.11.0)
Building process involves building wasm and node package, in root directory you can find a
bash.sh
file. This bash script can be used for building a wasm module.# Build wasm module set -xe clang \ -Wall \ -Wextra \ -I3dparty/caifu/lemon \ -I3dparty/caifu \ --target=wasm32 \ -o blueberry.o \ -c ./src/c/blueberry.c \ wasm-ld \ -m wasm32 \ --no-entry --export-all --allow-undefined \ -o dist/blueberry.wasm blueberry.o \ # Delete temporary object file rm blueberry.o
Therefore node package could be builded with simple, command.
npm run build
Actually above command will automatically try to build wasm file and node package and put everything into dist folder.
blueb.js is free and open source library/package. All code in this repository is licensed under
- MIT License (LICENSE.md or https://opensource.org/license/mit/)