WebAssembly
The "WebAssembly" sub-platform of the Island target lets you build libraries and modules that can run in modern web browsers and interact with JavaScript.
Available APIs:
- Core browser and JavaScript APIs (DOM, etc)
- Island RTL
- Elements RTL
- Delphi RTL
- Swift Base Library (mainly for use with Swift)
Of course any other custom, third party or open source C APIs can be imported using FXGen.
Common Projects
WebAssembly supports two common project goals:
-
Web Modules allow you build code that runs in the web browser, typically as part of a website or web application. The code can interact with the Browser object, the Document Object Model (DOM) and the HTML and JavaScript code that runs as part of the web page.
-
Node.js Modules, instead, can be run in the Node.js runtime, usually as part of a larger Node.js server-side application. They can interact with Node.js and other JavaScript that is part of the server application.
In addition to these two "application" project types, you can of course also create Static Library projects. As on the other platforms, static libraries compile to a binary file that can then be used from other (Browser or Node.js) application projects, to share and re-use code.
Additional Topics
- Interop between WebAssembly & JavaScript
- Working with the Browser APIs & the Document Object Model (DOM)
- Debugging WebAssembly Projects
- Deploying and Shipping WebAssembly Projects
Development, Deployment and Debugging
Development of Island apps for WebAssembly is supported in Visual Studio, Fire and Water. The Google Chrome browser needs to be installed to debug WebAssembly Web Modules in a website context, and Node.js is required to debug Node.js modules.
Read moere about debugging and deploying here.
Compiler Back-ends
- Island/WebAssembly