Google's Flutter showcases new graphics capabilities, WebAssembly support, and RISC-V

Google’s Flutter showcases new graphics capabilities, WebAssembly support, and RISC-V

Flutter, Google’s open source framework for creating cross-platform apps for mobile, web and desktop, is hosting a Flutter Forward event in Nairobi, Kenya today. As the name suggests, the team uses the event to showcase the framework’s new and upcoming features – most of which are still very early in its development cycle. The main highlights here are significantly improved graphics performance, the ability to embed Flutter code more easily into existing web and mobile apps, and support for new architectures such as Web Assembly and RISC-V. Almost all of this potential is still in the canaries and behind the mark, but it does show where Google plans to take this project in the coming months – and helps the massive open source ecosystem around it understand where some complementary work could be useful (about 40% of contributors to Flutter are from outside of Google).

Tim Sneath, Google’s director of product and UX for Flutter and the Dart programming language, told me that the team decided to rewrite Impeller, Flutter’s runtime. This new version aims to fix some of the glitches found in the previous engine but also significantly improves performance – all while still providing support for hot reloads and other core Flutter features. “It’s a different kind of experience. It’s smooth as silk,” he said. “Essentially, we’re able to create a custom-built graphics rendering engine for Flutter rather than leveraging a general-purpose renderer.”

To enable this performance, the engine now features pre-compiled shaders, avoiding the frame drops of the previous engine during shader compilation. There’s also now support for custom shaders and pixel shaders, which enables a number of new effects – which in turn will enable developers to build a host of new experiences on top of Flutter. Underneath all of this are the low-level Vulkan and Metal 3D graphics APIs for Android and iOS. Currently, the team is focusing its work here on mobile devices, though many of these new graphics capabilities should also work on macOS and Windows already. “Our general model for Flutter is to take it everywhere you can draw pixels,” Sneath said.

Speaking of using Flutter everywhere, another new feature the team is previewing is embedding items. For web developers, this means that they can use this to easily embed Flutter content using a standard

bit. While one could obviously write an entire application using Flutter and Dart, many developers may want to integrate this new code into existing applications that may have been written in a different language.

The team is also working on a new package that enables better interoperability between JavaScript and Dart, as well as new tools that allow Flutter to call system APIs more easily on Android and iOS. It already had this ability before, but making this work required developers to write a lot of boilerplate code.

Looking ahead, the team is also making its first efforts to translate Flutter to WebAssembly. With hype around this binary format growing rapidly—and browser support and server-side tools maturing—it’s perhaps not surprising that the Flutter team is interested in this technology, too. Sneath explained that it’s mostly about getting extra performance out of Flutter. “Dart transpiles into very tightly compiled JavaScript code, but it’s still JavaScript code so it will load and interpret – and to us, WebAssembly looks like it will get us some improved load time, and reduce the size and number of megabytes transferred over the wire. That sounds interesting,” he said. WebAssembly has the potential – both on and off the Web – to become this new kind of portable lingua franca. I like the idea that we can also use other code in other languages ​​in WebAssembly.”

RISC-V-based ClockworkPi DevTerm suite.

As for RISC-V, the open standard, royalty-free chip architecture that’s also starting to get traction across the industry, Sneath noted that it’s still very early days (although he said he really enjoyed playing with ClockworkPi-based RISC-V DevTerm Kit) but believes support for this architecture could open up new platforms for Flutter, especially in the embedded space. Since Google’s Android team is also investing in this architecture, it’s definitely worth keeping an eye on what Google is doing here, even as the number of developers specifically targeting this architecture is certainly still very low.

Finally, the Flutter team is also launching an interesting new toolkit for news publishers, which builds on the success of a similar initiative the team launched for game developers at Google’s I/O developer conference last year. This toolkit should enable new publishers to quickly build a new mobile app centered around them with authentication support, ad integration, notifications, and more — all without having to design these elements from scratch.

#Googles #Flutter #showcases #graphics #capabilities #WebAssembly #support #RISCV

Leave a Comment

Your email address will not be published. Required fields are marked *