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.

dartlogo

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.

dartlogo

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.

Banner


Supersimple - Deep Insights From Data
02/04/2024

Announcing $2.2 Million in pre-seed funding, the Estonian startup Supersimple has launched an AI-native data analytics platform which combines a semantic data modeling layer with the ability to answer [ ... ]



NVIDIA Releases Free Courses On AI
19/04/2024

NVIDIA has jumped on the AI bandwagon in a big way. Hardware aside, this means working on training material too. Several self- paced courses have been released and for free too!


More News

raspberry pi books

 

Comments




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

Last Updated ( Tuesday, 20 February 2024 )