Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
At work, but not for production apps
I don’t use WebAssembly but expect to when the technology matures
I have no plans to use WebAssembly
No plans and I get mad whenever I see the buzzword
Frontend Development / Rust / WebAssembly

Dev News: Vite Rust-ifies, Roc Language, JS Framework SDKs

Vite embraces Rust for its roadmap; the Roc language compiles to WebAssembly, and JS framework SDKs for authentication.
Nov 24th, 2023 7:30am by
Featued image for: Dev News: Vite Rust-ifies, Roc Language, JS Framework SDKs
Photo via Pexels

Vite 5 was released on Nov. 16 and is now powered by Rollup 4 — for now. Soon, the JavaScript module bundler will be replaced by Rolldown, a Rust port of Rollup with compatible APIs.

The frontend build tool Vite is embracing Rust, from moving to Rolldown in the near future to moving to a Rust core long-term. Evan You, creator of the frontend build tool, outlined the roadmap for Vite to “Rust-ify” at last month’s ViteConf 2023.

Moving to Rolldown will mean a boost in build performance, and later on in dev performance as the team moves performance sensitive parts of Vite to Rust. It will also reduce inconsistencies between dev and build, the team noted. While Rolldown is currently in early stages, the team hopes to open source the codebase before the end of the year.

Vite 5 focused on cleaning up the API by removing deprecated features, streamlining features and closing some long-standing issues, according to the release notes. Rollup 4 also provides a “big boost in build performance,” said the team.

Other changes in this release of Vite:

  • CJS Node API has been depreciated;
  • Vite 5 requires Node.js 18/20+. Node.js 14/16/17/19 will no longer be supported;
  • server.warmup, new feature that improves startup time. “It lets you define a list of modules that should be pre-transformed as soon as the server starts,” the team added. “When using –open or, Vite will also automatically warm up the entry point of your app or the provided URL to open.”

Improvements in Vite 4.3 already increased the speed to up to four times faster for a cold startup and up to two-times faster for hot model replacement (HMR).

You pointed out that Vite’s ecosystem has already expanded to include:

  • Angular, which uses Vite as a deg server;
  • Preact, which switched the default tooling to Vite in June;
  • Redwood, which is now built on Vite;
  • Bun, which has supported Vita for awhile now; and
  • Remix, which is working with the Vite team on a migration to Vite.

Roc Language for WebAssembly Launches Website

The Roc language launched an official website this week. The Roc site boasts that the new language is user-friendly and fast for both build and run. The language compiles to machine code or WebAssembly.

Use cases for Roc include:

  • Creating scripts and command-line interfaces (CLIs). “The compiler produces binary executables, so Roc programs can run on devices that don’t have Roc itself installed,” the documentation noted.
  • Building web servers in Roc. The site notes that, behind the scenes, it uses Rust’s “high-performance hyper and tokio libraries to execute your Roc function on incoming requests.”
  • Embedding into other languages. Roc functions can be called from other languages. This GitHub project offers basic examples of how to call Roc functions from Python, Node.js, Swift, WebAssembly, and JVM languages.

FusionAuth Launches Open Source SDKs for Vue, React and Angular

FusionAuth, a customer identity platform for developers, released new open source software development kits that support Angular, React and Vue frontend frameworks.

The SDKs are designed to make it easier for developers to prioritize authentication for single-page applications (SPAs) via app integration with FusionAuth.

“Our Vue, React and Angular JavaScript SDKs will help developers quickly and seamlessly integrate with FusionAuth to add authentication in their applications. This allows them to deliver innovative and secure software faster.” Brian Pontarelli, founder and CEO at FusionAuth, said in a prepared statement.

Developers can use FusionAuth to add registration, login and user management features to their applications at scale. The company also has client libraries for Python, Java, Typescript and five other languages, as well as an OpenAPI spec.

TypeScript 5.3 Released

TypeScript Program Manager Daniel Rosenwasser at Microsoft keeps TypeScript on a steady release cadence: This week the team delivered TypeScript 5.3.

“If you’re not familiar with TypeScript, it’s a language that adds type syntax to JavaScript to bring type-checking,” Rosenwasser explained. “Type-checking can catch all sorts of issues like typos and forgetting to check for null and undefined. But types go beyond type-checking – the same analyses of TypeScript’s type-checker are used for rich editor tooling like auto-completion, code navigation, and refactorings.”

TypeScript, for instance, underlies the experience of developers who write JavaScript in editors like Visual Studio or VS Code, he added.

The updates in TypeScript 5.3 include:

  • Import attributes. “One use-case of import attributes is to provide information about the expected format of a module to the runtime,” Rosenwasser explained.
  • Stable Support resolution-mode in Import Types
  • resolution-mode Supported in All Module Modes
  • switch (true) Narrowing
  • Narrowing On Comparisons to Booleans
  • Optimizations by Skipping JSDoc Parsing
  • Consolidation Between tsserverlibrary.js and typescript.js

Speaking of TypeScript, if you’ve wondered how to use TypeScript with React, this free tutorial may be of interest.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.