deno
swc
Our great sponsors
deno | swc | |
---|---|---|
429 | 136 | |
90,874 | 28,550 | |
0.7% | 1.8% | |
8.9 | 9.8 | |
3 days ago | 1 day ago | |
Rust | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
deno
-
Deno by Example
Here is the relevant Github issue with a better explanation:
-
stripe-node with Deno
Deno, version 1.28 or later.
-
Node.js vs. Deno vs. Bun: JavaScript runtime comparison
import { serve } from "https://deno.land/[email protected]/http/server.ts"; const handler = async (_request: Request): Promise => { const resp = await fetch("https://api.github.com/users/denoland", { // The init object here has an headers object containing a // header that indicates what type of response we accept. // We're not specifying the method field since by default // fetch makes a GET request. headers: { accept: "application/json", }, }); return new Response(resp.body, { status: resp.status, headers: { "content-type": "application/json", }, }); }; serve(handler);
-
Deno KV Is in Open Beta
Does this change your mind at all? https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b...
It looks to me like they've documented the KV Connect protocol they invented to support this feature, in enough detail that anyone else could build an alternative backend for it.
This has helped me feel completely OK with how they're handling this. They get an advantage in that they've already built an extremely robust proprietary backend, but I find that acceptable given the documented protocol.
Yes, sort of - on Deno Deploy the authentication doesn't come from a token in env vars, but from intrinsic security tickets baked into the Deno Deploy system. Also, it's a bit faster on first connect, because compared to KV connect we can skip the metadata exchange[1] because the information it provides is already present in Deno Deploy through other means. Both the backend service and frontend API (JS->KV) is the same though :)
[1]: https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b...
-
The Ascent of Node.js: How a runtime changed the Web
import { serve } from "https://deno.land/[email protected]/http/server.ts";
- Ask HN: Where do I find good code to read?
- Deno.land is down, which means Supabase functions are down locally
-
Enhancing AWS Lambda Security with Deno
Deno is an alternative JavaScript runtime that was released back in 2020. I’ve been seeing more interest in it recently, and it has some compelling features:
-
Introducing Atomic Emails – Self-hosted temporary email platform wherever you need it.
Most platform connectors are written on Deno, that allows you to host them serverless for free!
swc
-
Ruby Outperforms C: Breaking the Catch-22
This is specifically about breaking the myth that performing expensive self-contained operations (e.g, parsing GraphQL) in a native extension (C, Rust, etc.) is always faster than the interpreted language.
The JS ecosystem has the same problem, people think rewriting everything in Rust will be a magic fix. In practice, there's always the problem highlighted in the post (transitioning is expensive, causes optimization bailouts), as well as the cost of actually getting the results back into Node-land. This is why SWC abandoned the JS API for writing plugins - constantly bouncing back and forth while traversing AST nodes was even slower than Babel (e.g https://github.com/swc-project/swc/issues/1392#issuecomment-...)
-
Building a Minimalist Docker Image with Node, TypeScript
Why Speedy Web Compiler ?
- TypeScript Is Surprisingly OK for Compilers
-
FTA: Fast TypeScript Analyzer
FTA is a TypeScript static analysis tool built on the speedy foundations of swc. FTA is fast; capable of analyzing more than 150 files per second on typical hardware, it offers a powerful addition to your code quality toolkit.
-
Show HN: Ezno, a TypeScript checker written in Rust, is now open source
Very cool! I'm curious, is this intended for dev tooling?
For example, I could see this (or something similar) being useful as the engine for a typescript language server that would be faster than the standard one
But if it's not aimed at 1:1 with tsc, would it be intended more for something like swc[1]?
Or what would you expect people to use this for, besides just being a cool project to learn from?
-
[AskJS] Advantages of Rollup over other bundlers for creating libraries?
Rollup is highly configurable via plugins. It also supports a wide range of transpilation targets. However, it's written in JavaScript (well, TypeScript) so there's a ceiling on how fast it can go. esbuild and swc are orders-of-magnitude faster than Rollup.
-
Optimize your Bundle Size with SWC and GraphQL Codegen
There was already a Babel plugin for the client-preset for projects using Babel in the client-preset package. Now, as SWC itself, and Next.js is becoming more popular and uses SWC as its default compiler, there was a need for a SWC plugin as well. SWC is a fast and modern JavaScript/TypeScript compiler written in Rust, so the Babel plugin couldn't be used.
-
What are some stuff that Rust isn't good at?
MyPy and tsc on the other hand? Please make a Ruff for MyPy and hurry up and fund the author of SWC to develop STC. I'm tired of waiting several seconds after each :w for my quickcheck window to update.
-
[Blog post]: Scaling Rust builds with Bazel
I've been thinking this too time to time and tried to apply some poc to one of the codebase (https://github.com/swc-project/swc) but wasn't able to make notable progress. There were couple of reasons and curious how you could solve it.
- No one cares about Bun's speed. Your CI does though
What are some alternatives?
esbuild - An extremely fast bundler for the web
vite - Next generation frontend tooling. It's fast!
ts-loader - TypeScript loader for webpack
ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
typescript-language-server - TypeScript & JavaScript Language Server
tsup - The simplest and fastest way to bundle your TypeScript libraries.
ts-node - TypeScript execution and REPL for node.js
vitest - A Vite-native test framework. It's fast!
sucrase - Super-fast alternative to Babel for when you can target modern JS runtimes
bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
pnpm - Fast, disk space efficient package manager