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


Kafka 3.9 Adds Dynamic KRaft Quorums
16/12/2024

Kafka 3.9 has been released. The team says this is a major release and the final in the 3.x line. It This will also be the final major release to feature the deprecated Apache ZooKeeper mode. Kafka is [ ... ]



Rust 1.83 Improves Const Context Code Handling
12/12/2024

Rust 1.83 has been released with improvements to the handling of code running in const contexts.


More News

espbook

 

Comments




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

Last Updated ( Tuesday, 20 February 2024 )