All Projects → boyanio → Angular Wasm

boyanio / Angular Wasm

Licence: mit
Examples of how to use WebAssembly within Angular

Programming Languages

javascript
184084 projects - #8 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Angular Wasm

As Wasi
An AssemblyScript API layer for WASI system calls.
Stars: ✭ 135 (-10.6%)
Mutual labels:  webassembly
Assemblyscript
A TypeScript-like language for WebAssembly.
Stars: ✭ 13,152 (+8609.93%)
Mutual labels:  webassembly
Rapidcms
RapidCMS is a Blazor framework which allows you to build a responsive and flexible CMS purely from code. It provides a basic set of editors and controls, and is fully customisable.
Stars: ✭ 149 (-1.32%)
Mutual labels:  webassembly
Awesome Wasm Tools
😎 A curated list of awesome, language-agnostic WebAssembly tools
Stars: ✭ 139 (-7.95%)
Mutual labels:  webassembly
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-7.28%)
Mutual labels:  webassembly
Wasm Crypto
A WebAssembly (via AssemblyScript) set of cryptographic primitives for building authentication and key exchange protocols.
Stars: ✭ 146 (-3.31%)
Mutual labels:  webassembly
Imjoy
ImJoy: Deep Learning Made Easy!
Stars: ✭ 136 (-9.93%)
Mutual labels:  webassembly
Spec
WebAssembly for Proxies (ABI specification)
Stars: ✭ 150 (-0.66%)
Mutual labels:  webassembly
Woz
Woz is a progressive WebAssembly app (PWAA) generator for Rust.
Stars: ✭ 145 (-3.97%)
Mutual labels:  webassembly
Libarchivejs
Archive library for browsers
Stars: ✭ 145 (-3.97%)
Mutual labels:  webassembly
Proxy Wasm Rust Sdk
WebAssembly for Proxies (Rust SDK)
Stars: ✭ 137 (-9.27%)
Mutual labels:  webassembly
Proxy Wasm Go Sdk
Go SDK for WebAssembly-based Envoy extensions
Stars: ✭ 137 (-9.27%)
Mutual labels:  webassembly
Wah
a slightly higher-level language superset of webassembly
Stars: ✭ 147 (-2.65%)
Mutual labels:  webassembly
Opencombine
Open source implementation of Apple's Combine framework for processing values over time.
Stars: ✭ 2,040 (+1250.99%)
Mutual labels:  webassembly
Iswasmfast
Performance comparison of WebAssembly, C++ Addon, and native implementations of various algorithms in Node.js.
Stars: ✭ 149 (-1.32%)
Mutual labels:  webassembly
Blazormaterial
Blazor components implementing Google's Material components for web - https://material.io/components/web
Stars: ✭ 136 (-9.93%)
Mutual labels:  webassembly
Rs Asteroids
A variation on the game Asteroids, written in Rust
Stars: ✭ 146 (-3.31%)
Mutual labels:  webassembly
Deno Sqlite
Deno SQLite module
Stars: ✭ 151 (+0%)
Mutual labels:  webassembly
0x Mesh
A peer-to-peer network for sharing 0x orders
Stars: ✭ 149 (-1.32%)
Mutual labels:  webassembly
Indigo
Universal cheminformatics libraries, utilities and database search tools
Stars: ✭ 146 (-3.31%)
Mutual labels:  webassembly

Angular & WebAssembly

This project shows how WebAssembly could be used in Angular in form of components and helper services. The examples are written in C/C++ and compiled to WebAssembly using Emscripten.

You can find the following examples:

  • Fibonacci shows the "raw" communication between JavaScript and WebAssembly without using Emscripten's glue code. Inspired by devlucky, the example demonstrates the performance difference between JavaScript and WebAssembly when calculating Fibonacci series using three different implementations.
  • Console Logger binds to window click directly in the C code by using Emscripten's library. The C code uses printf, which I have overloaded to add items to the list instead of printing them to the console (default behavior).
  • Text-to-ASCII allows you to convert text to ASCII art on the fly.
  • BPM-to-ASCII allows you to convert simple bitmaps to ASCII art.
  • 3D Cube shows how you can render 3D graphics using OpenGL (which is then converted to WebGL) and manipulate it on the fly.
  • Proof of Work is a simple Proof of Work system (similar to the one used in bitcoin), which demonstrates activities that might take long time to complete.
  • Person Record shows how to pass complex data between JavaScript and WebAssembly.

Prerequisites

C/C++ code is built using Emscripten inside Docker, so you will need Docker running on your machine.

Build

To build the demo, run the following in the root folder:

npm i
npm run wasm
npm start

Then you can open your browser at http://localhost:4200 to see the demo.

Pre-compiled dependencies

For some of the examples, I have pre-compiled parts of the C/C++ source into linked bitcode (.bc files) to ease the build process.

  • libSOIL - Simple OpenGL Image Library (SOIL) is a tiny C library used primarily for uploading textures into OpenGL

Questions & contribution

You can reach me on Twitter @boyanio. You can also open an issue here on GitHub or make a Pull-Request directly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].