Yes also  js/webassembly is not exclusively related to the browser or node.js.
There will be expanding opportunities with WASI in now browsers environment/runtime like e.g.:

  
      

      GitHub
  

  
    

GitHub - WebAssembly/wasi-nn: Neural Network proposal for WASI 1

  Neural Network proposal for WASI. Contribute to WebAssembly/wasi-nn development by creating an account on GitHub.


  

  
    
    
  

  



  

      github.com
  

  
    WebAssembly/wasi-nn/blob/main/docs/Explainer.md


    # Design Motivation and Considerations

## Why Wasm for ML?
Trained machine learning models are typically deployed on a variety of devices with different
architectures and operating systems. WebAssembly provides an ideal portable form of deployment for
those models. 

## Why WASI?
Although a whole machine learning framework could be potentially compiled into Wasm, special
hardware acceleration is often needed in order to be performant. For example, SIMD instructions such
as AVX512 on a CPU can speed up performance by several hundred times. Other hardware acclerator
examples are GPU, TPU, FPGA. All of those acceleration mechanisms are not available within Wasm. In
addition, the field of machine learning is still evolving rapidly, with new operations and network
topologies emerging continuously. It would be a challenge to define an evolving set of operations to
support in the API. 

## Design Goals
Our approach is to start with a model loader API, inspired by WebNN’s model loader proposal. It
treats a machine learning graph as an opaque handle that we can use to send inputs, get outputs, and
perform forward propagation. Since inferencing is the main ML use case, and our initial focus, this



  This file has been truncated. show original

  

  
    
    
  

  



  
      

      Bytecode Alliance – 14 Dec 20
  

  
    

Machine Learning in WebAssembly: Using wasi-nn in Wasmtime

  The wasi-nn proposal allows WebAssembly programs to access host-provided machine learning(ML) functions. This post will explain the motivation for wasi-nn, a brief look at thespecification, and how to use it in Wasmtime to do machine lea...