@ml.wasm/linalg
v0.1.7
Published
Linear algebra accelerated by WebAssembly
Readme
This project is currently in alpha and missing some crucial features
Quick Start
Here, to demonstrate, we'll be using vite to scaffold a project:
npm init vite@latest # choose a simple vanilla js project
npm i @ml.wasm/linalgAnd add this to main.js:
import init, {
initThreadPool,
IntegersVector,
FloatsVector,
StringsVector,
IntegersMatrix,
FloatsMatrix,
StringsMatrix,
} from '@ml.wasm/linalg';
(async () => {
// This init function sets up everything you need to use this library
await init();
// This sets up the concurrency
await initThreadPool(navigator.hardwareConcurrency);
// All your code goes here...
})();Note that you'll have to create a vite.config.js:
export default {
server: {
fs: {
// Allow serving files from one level up to the project root
allow: ['..']
}
}
}