Dev News: Gemini AI for Android, Deno WebGPU, Vite and Rust

Gemini is Google’s new multimodal AI foundation model. It was released just a week ago, but Google is already offering support for Android developers who want to leverage AI in apps. Gemini Pro is accessible via the Gemini API, the technology giant announced Wednesday. Developers can use the Google AI SDK, a client for Android, to integrate with Gemini Pro.

The company also pointed to Google AI Studio, which is available in early access right now, as a “streamlined way for developers to integrate the Gemini Pro model, craft prompts, crate API keys, and transform ideas into AI apps.” It allows developers to create a prompt in Google AI Studio and generate a Kotlin code integration snippet by clicking on the “Get code” action. There’s a free introductory course on Google AI Studio as well.

Finally, developers can use the Gemini API directly in the current canary build version of Android Studio. There’s also a new project template that allows developers to get a jump start with the Google AI SDK for Android.

As an alternative, developers can import the generative AI code sample and set it up in Android Studio. To do that, it directs developers to select File > New > Import Sample, and search for “Generative AI Sample.”

Deno Goes Back to Finalized WebGPU API

Deno 1.39 is bringing back the WebGPU API, which is useful for rendering, games and a variety of other applications, such as machine learning algorithms expressed as a series of matrix operations, the team wrote Thursday.

WebGPU API provides developers with a “low-level, high performance, cross-architecture way to program GPU hardware from JavaScript,” according to team Deno. The JavaScript runtime first introduced the API back in early 2021. Earlier this year, it removed it due to performance problems.

The Deno team noted that the spec is finalized and Chrome has already shipped the API. Firefox and Safari are working on supporting it as well.

“Our WebGPU implementation is based on the same underlying system as the upcoming WebGPU implementation in Firefox, so we’re confident that it’s a solid foundation for developers to build on,” the team stated.

Vite 5 Includes Rollup’s Rust-Based Parser

Vite 5 was released last month and with it came Rollup version 4, a major version that introduces a Rust-based parser. Creator Evan You explained the significance of that news in a recently released video of his VueConf Toronto presentation.

Vite is a frontend development tool that’s a “friendly” alternative to traditional web build tools such as Webpack. It’s used as the dev server for Angular and as the default tooling for React and Redwood. It’s also supported by the runtime Bun and Remix recently released an unstable Vite plugin. Vite has reached almost 8 million weekly NPM, downloads, according to You.

Rollup is a module bundler for JavaScript that compiles small pieces of code into something larger and more complex, like a library or an application. It uses the standardized format for code modules from the JavaScript ES6 revision, instead of CommonJS. Rollup’s Rust-based parser will improve Rollup production build performance by a “decent percentage,” You said. He also discussed Vue at that event.

In addition, the Vite team deprecated the common Javascript API of Vite itself, You said. Most dependencies downstream are already using the ESMAScript (ESM) API, he added.

“This is just part of the overall effort for Vite,” he said. “As this newer build tool, we have the opportunity to help push the ecosystem towards a pure ESM world and get us out of this mess of Common JS and ESM as soon as possible.”

You said they also have a better-defined replacement handling with Vite 5.

“Previously, the global defined variable replacement in Vite is implemented a little bit differently between development and production, and the production build replacement strategy is also a bit of brute force because it’s using regular expression replacements,” he explained. “In this version, we’re now using the ES Build-based strategy to do the replacements, which should result in more solid and more efficient replacements overall.”

Vite 5 also dropped support for ELL Node.js versions, which means it won’t support Node 16, 17, and 19. The current LTS node version, 18, will be the baseline supported Vite 5, he said.

Group Created with Sketch.

 

 

 

 

Top