Giter VIP home page Giter VIP logo

cppwasm-book's Introduction

C/C++面向WebAssembly编程

本书介绍了在工程化应用中使用C/C++进行WebAssembly开发的方法。关于WebAssembly的基础知识可以参考《WebAssembly标准入门》。

前言

Ending's law: "Any application that can be compiled to WebAssembly, will be compiled to WebAssembly eventually."

WebAssembly是新一代的Web虚拟机标准,C/C++程序可以通过Emscripten工具链编译为WebAssembly二进制格式.wasm,进而导入网页中供JavaScript调用——这意味着使用C/C++编写的程序将可以直接运行在网页中。

本书从Emscripten基本使用开始介绍了C/C++开发WebAssembly模块的方法;并且以作者在实际工程项目中获取的一手经验为基础,提出了一些一般性的设计原则和技术框架。

笔者认为,一个理想的面向Web的C/C++工程应该对编译目标不敏感——既可以被编译为NativeCode直接运行,也可以被编译为WebAssembly在网页中运行,二者的切换只需要更改运行环境设置,如此方可充分利用现有IDE环境强大的开发、调试、分析、测试等功能,提高工程质量、降低开发成本。

但WebAssembly的运行环境毕竟与本地环境有着巨大的差异,因此为了达到上述理想目标,从整体框架到接口设计甚至到函数间的数据交换层面都必须充分考虑Web环境的特点(或者说限制),而这正是本书所贯彻的“WebAssembly友好”的内涵所在。

在线阅读

参考资料

关注微信公众号 (wasm-hackers) 或 QQ群 (726475047)


当前进度


版权声明

自有版权,转载请联系作者。

cppwasm-book's People

Contributors

3dgen avatar chai2010 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.