资源算法picojs-rust-wasm

picojs-rust-wasm

2019-12-30 | |  50 |   0 |   0

picojs-rust-wasm

This project is a Rust webassembly implementation of picojs.

Recently I found a great project picojs on Github, which is a mini face detection library written in JavaScript.

Since I'm a front-end engineer who is keen on Rust, I decided to implement picojs in rust and portal it to the browser via webassembly. I use wasm-bindgen to interact between Rust and JavaScript.

Run the demo

After clone this repo, do thew following things:

npm i
npm run build
npm run serve

What I already learned

  1. The basic workflow of writing a webassembly module in rust.

  2. Some pattern of interact between Rust and JavaScript in webassembly.

Todo

I think webassembly has a great potential in this application. Although I'm just a beginner of Rust, the webassembly module I wrote seems to be two times faster than the JavaScript version in some basic tests. So there must be a lot of improvements can be done.

  1. Add a comprehensive performance stats or benchmark, compare to the JavaScript version and the C webassembly version.

  2. Improve the quality of Rust part code.


上一篇:picojson

下一篇:picojson_serializer

用户评价
全部评价

热门资源

  • TensorFlow-Course

    This repository aims to provide simple and read...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • mxnet_VanillaCNN

    This is a mxnet implementation of the Vanilla C...

  • vsepp_tensorflow

    Improving Visual-Semantic Embeddings with Hard ...

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...