Dart Adds WebAssembly Support
Written by Kay Ewbank   
Tuesday, 20 February 2024

Google has released Dart 3.3 with experimental support for applications compiled to WebAssembly, along with new extension types and a revamped JavaScript interop model.

Dart is a client-optimized language designed to provide a way to create fast apps on any platform. It began life as an alternative to JavaScript that would be supported directly by browsers, but when this didn't work out it was redeveloped by Google as a better compiler. Dart is object-oriented and class-based with a C-style syntax.


The new extension types serve the same purpose as wrapper classes, but don't require the creation of an extra run-time object, which can get expensive when you need to wrap lots of objects. The Dart team says that because extension types are static-only and compiled away at run time, they are essentially zero cost. Extension types are a major component of static JS interop because they can easily modify an existing type's interface without incurring the cost of an actual wrapper.

Dart 3.3 also introduces a new model for interoperating with JavaScript libraries, starting with a new set of APIs for interacting with JavaScript. This provides a typed API that clearly defines the boundary between the two languages with static enforcement.

The new JavaScript interop method is part of the experimental support for web applications compiled to WebAssembly. While WebAssembly support in Flutter Web remains experimental, the team says it is working hard to stabilize the implementation. To run Flutter applications on the web using WebAssembly, you need to migrate all code to use the new JavaScript Interop mechanism.

The other improvement of note is the introduction of a beta version of the Google AI Dart SDK. This can be used to build generative AI features into your Dart or Flutter app, using Gemini, Google's latest family of AI models.

Dart 3.3 is available now.


More Information

Dart Website

Related Articles

Google Dart 3 Adds Record Support

Dart 3 Will Be Fully Sound And Null Safe

Dart 2.12 Released With FFI

Dart 2.6 Adds Native Linux Support

Dart 2.1 Is Smaller And Faster

Dart 2 Released With New Mobile Focus

Google's Dart Reborn As Cross Platform App Language

Dart Changes Course - No Longer To Be Native In Chrome

The Astonishing Rise Of Dart

Ecma Approves Dart

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Quadrupedal Parkour

What is it with robots and parkour? First Atlas and now ANYmal want to impress us with their prowess. For the roboticist, however, emulating the skills of free running can enhance the capabilities of  [ ... ]

Running PostgreSQL Inside Your Browser With PGLite

Thanks to WebAssembly we can now enjoy PostgreSQL inside the browser so that we can build reactive, realtime, local-first apps directly on Postgres. PGLite is about to make this even easier.

More News

raspberry pi books



or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 20 February 2024 )