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


52nd Mersenne Prime Found
27/10/2024

It has been nearly six years since the last Mersenne prime was discovered. Now, at last, we have Mersenne prime number 52 and it has 41,024,320 digits!



Apollo Adds REST APIs For GraphQL
29/10/2024

Apollo has added a simpler way to integrate REST APIs into a federated GraphQL environment. Available now in public preview, can be used to map REST API endpoints to their GraphQL schema using a decla [ ... ]


More News

espbook

 

Comments




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

Last Updated ( Tuesday, 20 February 2024 )