百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

asm-dom

> 编程语言
开源

一个最小的 WebAssembly 虚拟 DOM,用于构建 C++ SPA (单页面应用程序)

2.8K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个最小的 WebAssembly 虚拟 DOM,用于构建 C++ SPA (单页面应用程序)

:rage4: asm-dom :rage4:

A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)

Table of Contents

  • Motivation
  • Inline Example
  • Getting started
  • Ecosystem
  • Examples
  • Roadmap
  • Change Log
  • Authors
  • Copyright and License

Motivation

asm-dom is a minimal WebAssembly virtual DOM to build C++ SPA (Single page applications). You can write an entire SPA in C++ and compile it to WebAssembly (or asmjs as fallback) using Emscripten, asm-dom will call DOM APIs for you. This will produce an app that aims to execute at native speed by taking advantage of common hardware capabilities, also, you can use your C/C++ code without any change, you haven't to create a binding layer to use it (as we have to do if we want to use a C++ lib from JS). Basically we are creating an app in C++ that call javascript if needed instead of the opposite. You can write only once in C++ and share as much code as possible with desktop/mobile apps and web site. If you want to learn more about performance, please see this.

How can I structure my application with asm-dom?

asm-dom is a low-level virtual DOM library. It is unopinionated with regards to how you should structure your application.

How did you come up with the concept of asm-dom?

At the beginning asm-dom is born from the idea to test the powerful of WebAssembly in a common use case that is not gaming, VR, AR or Image / video editing. Unfortunately, at the moment, GC/DOM Integration is a future feature , so, asm-dom isn't totally developed in wasm. All interactions with the DOM are written in Javascript. This is a big disadvantage because of the overhead of the binding between JS and WASM, in the future asm-dom will be even more powerful, anyway results are satisfying.

Inline Example

…

Getting started

asm-dom aims to be used from C++, however it can be used also from javascript, here you can find the doc of both:

  • C++ docs
  • JS docs

Ecosystem

Here you can find a list of related projects:

  • gccx - CPX (JSX like syntax) support.
  • asm-dom-boilerplate - A simple boilerplate to start using asm-dom without configuration.

Examples

Examples are available in the examples folder.

Also, here is the list of third-party examples:

  • asm-dom-OO-counters
  • asm-dom-cmake - Build using cmake only.

and online Demos:

  • TODO MVC
  • simple counter

Roadmap

  • [ ] Thunks support
  • asm-dom aims to be even more powerful with GC/DOM Integration. Unfortunately this is a future feature , so, we have to be patient and wait a bit.

Change Log

This project adheres to Semantic Versioning.
Every release, along with the migration instructions, is documented on the Github Releases page.

Authors

Matteo Basso

  • github/mbasso
  • @teo_basso

Copyright and License

Copyright for portions of project asm-dom are held by:

  • Simon Friis Vindum, 2015 as part of project snabbdom
  • project snabbdom-to-html

All other copyright for project asm-dom are held by Matteo Basso.

Copyright (c) 2016, Matteo Basso.

asm-dom source code is licensed under the MIT License.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++asm-domasmjsdiffingdom

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言