0.2.2 • Published 5 years ago

numas.wasm v0.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

numas.wasm

numas.wasm is numas - multiplatform numerical library compiled to WebAssembly module.

Usage

To use this in your project import prebuilt module numas.wasm as WebAssembly module.

Build

To build project into WebAssembly module you need to have Node, NPM, Cargo and Rust with target wasm32-unknown-unknow.

If you have all of these, you can run npm run build and script will output numas.wasm into root of the project (or in target/ dir).

Generating Rust code

This project is also tool for generating Rust code (as glue for compiler) which uses simple templating syntax.

{{generate}}
pub fn test_function_{{T}}(x: {{T}}) -> () {
}
{{/generate}}

Example above generates this output (for configuration generic types i32, f32)

pub fn test_function_i32(x: i32) -> () {
}
pub fn test_function_f32(x: f32) -> () {
}

Basically it repeats parts between tokens {{generate}} and {{/generate}} and replaces token {{T}} with specific type. Nested {{generate}} tokens are not supported.

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

1.0.0

5 years ago