In the days of Geocities and Angelfire, a quirky HTML tag called <bgsound> enabled sound files to play in the background of webpages. Usually, these files were in the MIDI format. What a glorious era that was!
Sadly, <bgsound> has been removed from browsers and MIDI is obscure and hard to play back. But using the power of WebAssembly, Emscripten, Web Audio, and Web Components, I was able to bring MIDI and <bgsound> back from the dead!
BitMidi is a website that plays back MIDI files directly in the browser and has a collection of over 100,000 MIDIs to browse and choose from.
You can check out the slides “The Lost Art of MIDI – Bringing <bgsound> Back to the Web” from a talk I gave at JSConf Colombia 2018 to learn more about how BitMidi uses WebAssembly to play back MIDI files.
WebAssembly Core Specification is now an official standard, launching a powerful new language for the Web. WebAssembly is a safe, portable format designed for compact representation of code on modern processors including in a web browser.
Azul is a library for creating graphical user interfaces or GUIs in Rust. It mixes paradigms from functional, immediate mode GUI programming commonly found in games and game engines with an API suitable for developing desktop applications. Instead of focusing on an object-oriented approach to GUI programming ("a button is an object"), it focuses on combining objects by composition ("a button is a function") and achieves complex layouts by composing widgets into a larger DOM tree.
Azul separates the concerns of business logic / callbacks, data model and UI rendering / styling by not letting the UI / rendering logic have mutable access to the application data. Widgets of your user interface are seen as a "view" into your applications data, they are not "objects that manage their own state", like in so many other toolkits. Widgets are simply functions that render a certain state, more complex widgets combine buttons by calling a function multiple times.
The generated DOM itself is immutable and gets re-generated every frame. This makes testing and debugging very easy, since the UI is a pure function, mapping from a specific application state into a visual interface. For layouting, Azul features a custom CSS-like layout engine, which closely follows the CSS flexbox model.
We’re happy to announce the initial public work on GraalWasm — the WebAssembly engine implemented in GraalVM. GraalWasm currently implements the WebAssembly MVP (Minimum Viable Product) specification, and can run WebAssembly programs in the binary format, generated with compiler backends such as Emscripten.
Supporting WebAssembly expands the set of languages GraalVM can execute with a whole other set of languages to the ones supported by GraalVM and is further step towards making it a universal platform for programming language execution. This feature was also highly requested by the GraalVM community and we are happy to share our first results.
Note that this is a very early implementation, and GraalWasm is currently in experimental mode. We are working on extending our test suites and benchmarks, and we plan to improve performance and to implement WebAssembly extensions in the future. Feedback and open-source contributions are very welcome!
This blog post will cover what WebAssembly is, how GraalWasm was implemented in GraalVM, and how to use it.
Have you wondered how JS engines work? This past year I built an engine from scratch in Rust. It was fun, weird, exciting and sometimes exhausting. I will share my experience as well as what it is like to work on the specification, collaborate with TC39, and lessons from engines in use today.
Examples to get up and running with Web Assembly. A work in process. Includes some helpful macros for working with web assembly text format: group import/export, strings, types. A goal is to build an environment inspired by Mozilla's Sweet.js but for Web Assembly.
The Bytecode Alliance is an open source community dedicated to creating secure new software foundations, building on standards such as WebAssembly and WebAssembly System Interface (WASI).
The Bytecode Alliance is committed to establishing a capable, secure platform that allows application developers and service providers to confidently run untrusted code, on any infrastructure, for any operating system or device, leveraging decades of experience doing so inside web browsers.
We have a vision for a secure-by-default WebAssembly ecosystem for all platforms.