Skip to content

3IE/article-webassembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Project

Angular website integrating webassembly computations built and used as content material for this article : http://blog.3ie.fr/webassembly-angular/

AngularWasm

This project was generated with Angular CLI.

How to build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build. You can also run npm install.

Launch the server

Run ng serve --port 4200 for a dev server on port 4200, or simply run npm start.

Create components

Run ng generate component component-name to generate a new component.

Reminder

To compile C to WASM use the following instructions (you must install emsdk / emcc):

./emdsk update
./emdsk update-tags
./emdsk install latest
./emdsk activate latest
source ./emdsk_env.sh

cd app/src/wasm
emcc ./evaluator.c -Os -s WASM=1 -s MODULARIZE=1 -o ./evaluator.js

Note

I added the raws .js and .wasm files in src/app/wasm in case of you were having trouble to compile emsdk by yourself ;-).

Author

Léo Stephan

About

How to integrate WebAssembly into an Angular 5 project and why would you do so ?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors