Deno in 2024 and what's on the horizon
Happy new year to everyone! We had a very busy 2024, with the launch of Deno 2, JSR, stabilizing the Deno Standard Library, a bunch of performance improvements, and to top it all off — the Deno project crossed 100k stars on GitHub! Read more about our 2024 recap in our blog post.
Deno 2.1: Wasm imports, Node/npm backwards compatibility
Hot on the heels of our Deno 2 announcement, we released Deno 2.1, which makes importing Wasm modules as easy as any other file:
// Now in Deno 2.1
import { add } from "./add.wasm";
console.log(add(1, 2));
// $ deno main.ts
// 3
Wasm, or WebAssembly, is a low-level portable format meant to run at near-native speeds in the browser, which is often used in high performance web applications. We'll be coming out with a guide to Wasm shortly, so stay tuned (and if you want us to create content about anything specifically, do let us know!).
In addition to first class Wasm imports, 2.1 also provides a shorter way run npm create
with Deno, with the new deno init --npm
flag
# Previously
$ deno run -A npm:create-vite
# In 2.1
$ deno init --npm vite
[Deno's built-in toolchain] now includes an npm and JSR package manager with deno install
, deno add
, deno remove
. With 2.1, we've added deno outdated
to help display package versions:
$ deno outdated
┌────────────────┬─────────┬────────┬────────┐
│ Package │ Current │ Update │ Latest │
├────────────────┼─────────┼────────┼────────┤
│ jsr:@std/fmt │ 1.0.0 │ 1.0.3 │ 1.0.3 │
├────────────────┼─────────┼────────┼────────┤
│ jsr:@std/async │ 1.0.1 │ 1.0.1 │ 1.0.8 │
├────────────────┼─────────┼────────┼────────┤
│ npm:chalk │ 4.1.2 │ 4.1.2 │ 5.3.0 │
└────────────────┴─────────┴────────┴────────┘
Finally, you can now embed assets with deno compile
, a command that allows you to compile your project into a single binary executable across all platforms, making it easier to distribute and execute without needing to install dependencies.
Read the full announcement or watch the 3 minute video =>
#FreeJavaScript
In case you missed it, Oracle holds the trademark to JavaScript, causing all sorts of issues. We've penned an open letter to Oracle, asking them to free JavaScript, and have received over 15,000 signatures from prominent members of the web community, such as Brendan Eich himself.
We have formally filed a petition with the USPTO to cancel Oracle's "JavaScript" trademark. They've responded, saying they will not voluntarily withdraw.
We will continue to update you all on the status of this legal battle on our social media channels.
From the community
If you have something you've built with Deno, you can share it on our Discord's #showcase channel.
- You know cowsay? Well here's Deno say.
- a Deno 2 + Hono starter, with 1 click deploy to Railway
- Croner, a zero dependency cronjob library, is now Deno and TypeScript first
- teclas, a small zero dependency module for handling keyboard events
- icons.church, iconify for Fresh, React, Preact, Vue, Qwik, and SolidJS with Deno
- You can develop macOS desktop apps with Solid, Deno, and NativeScript!
- Nuggetize is an app to summarize any content on the internet with a URL.
- match, a robust pattern matching utility for JS/TS, inspired by Rust
- unasync, synchronously execute async functions, inspired by
synckit
andsync-threads
- aqualyrics, a package for seamless serialization and deserialization across lyric formats (LRC, TTML, SRT, etc.)
- Smallweb, a self-hostable personal cloud in a single folder. Think Deno Deploy but on your RaspberryPI!
- Want to use PostCSS with Deno? Check out this esbuild plugin that supports CSS, Sass, Less, and Stylus.
- web-vitals can generate a Lightouse report and send it as a plaintext email for your site.
JSR: a new Discord and regular office hours
In an effort to make JSR more independent of Deno, we have created a separate JSR-only Discord server, launched JSR's own social media channels (Twitter, Bluesky, and YouTube). If you want to learn how to contribute to JSR, check out the Discord where we have resources on how to do so.
We've also began holding bi-weekly Office Hours in our Discord, where anyone can come ask questions. Our next Office Hours will be a special one: we've invited the Sentry.io team to join us, and we'll port their JavaScript SDK to JSR, live! If you're curious what it's like to convert a reasonably complex JavaScript library to JSR, you don't want to miss this!
We have more coming up for JSR, so stay tuned.
In case you missed it...
- Rusty_V8 is now stable! If you want to interface with V8 via Rust, this is the crate to use. Or watch the 3 minute video.
- Want to modernize your JavaScript? Here's a handy guide on how to convert CommonJS to ESM.
- We published a bunch of new tutorials with Deno: Deno x tRPC, Deno x Drizzle, Deno x Astro, Deno x Solid, Deno x Qwik. Want to see a tutorial? Hit reply and let us know.
- We launched a new tutorial video series, Learn Deno, with several 2-5 minute videos that help you get started. If you're new to Deno, check out How to setup your Deno dev environment or All-in-one tooling for JavaScript and TypeScript.
- Ryan Dahl demos Deno 2 at GOTO Chicago 2024.
- Niklas Metje so graciously summarized everything he knows about Deno into this neat, interactive, fun guide. Check it out!
Finally... have you ever seen an ad for a JavaScript runtime? 👀️
https://www.youtube.com/watch?v=swXWUfufu2w
And that's it for this issue! If you think someone might find this useful, please forward it to them.
— Andy