Running JavaScript Actually Everywhere

This ad is not shown to multipass and full ticket holders
React Summit
React Summit 2026
June 11 - 15, 2026
Amsterdam & Online
The biggest React conference worldwide
Upcoming event
React Summit 2026
React Summit 2026
June 11 - 15, 2026. Amsterdam & Online
Learn more
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Intro JS ecosystem

  • Mobile: React Native and Expo
  • Desktop: Tauri and Electron
  • Server: Node, Bun and Deno

Problem statement

  • How can you share the logic cross-platform? Node, Bun and Deno can’t be reused in mobile. Writing Kotlin and Swift is extremely pricy. 
  • Most of internet usage today happens in mobile apps.
  • This is even greater in emerging economies where low-end smartphones are the only device.
  • Bare is the consequence of reaching limitations using node.js

Solution

  • Comparison between node, deno, bun and bare.
  • How to link Bare with react native
  • Mobile demo
  • Key characteristics of bare
  • Lightweight 
  • Node.js compatible
  • Native add-on
  • Single executable
  • Worry-less upgrades

This talk has been presented at Node Congress 2026, check out the latest edition of this JavaScript Conference.

FAQ

Bear is a modern runtime that can be used on iOS and Android. It supports React Native, Expo, and has native integration, allowing developers to opt into specific modules they need for their projects.

Unlike Node.js, Deno.js, or bin.js, Bear is specifically designed to run on mobile platforms like iOS and Android, supporting both React Native and Expo with native integration, allowing for a more seamless development experience.

A Worklet in Bear is similar to a worker that runs in the background. It allows communication between the React Native application and the Bear runtime using IPC (Inter-Process Communication).

To use Bear with React Native, you need to install React Native BearKit in your project, which will allow you to use the Bear runtime directly within your React Native application.

Bear follows a 'less is more' philosophy, focusing on a small core and allowing developers to add only the modules they need. This approach helps avoid bloated bundles and improves performance.

Yes, Bear can be compiled on various engines such as V8, GSC, Quick JS, or even Javascript for IoT devices, providing flexibility depending on the project's requirements.

Bear is compatible with Node.js, offering equivalent modules for system APIs and allowing projects to be shared or migrated between Node.js and Bear environments.

The Bear build project allows developers to package their JavaScript code as native applications or standalone executables for both desktop and mobile platforms.

Bear provides a smooth upgrade path by not including a standard library beyond core JavaScript APIs. Built-in modules like file systems are separate, allowing for easy upgrades and refactoring without breaking the codebase.

The Bear project is led by Casper as the tech lead, with contributors like Bala, Yasser, and others, including former Node.js core contributor Mahfin Tosh, who has significantly contributed to the NPM ecosystem.

Tony Gorez
Tony Gorez
21 min
26 Mar, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
JavaScript ecosystem enables versatile development for mobile using frameworks like React Native, Expo, and Bear. Challenges arise in porting server logic to mobile due to limitations in reusing core logic between backend and mobile. Bear stands out as a versatile runtime for iOS, Android, React Native, and Expo, allowing selective module integration. The integration of Bear with React Native simplifies mobile app development and background task execution. Bear emphasizes a 'less is more' philosophy, offering flexibility in engine compilation and compatibility with various platforms. It also supports streamlined native add-on development, NAPI support, and controlled upgrades for pushing runtime limits.

1. Challenges in Mobile Server Logic Porting

Short description:

JavaScript ecosystem allows versatile development with React Native, Expo, Tauri, Electron, Deno, Node.js, and bin. Challenge arises in porting server logic to mobile. Reusing core logic between backend and mobile poses limitations. Hiring native developers for such integration is costly for JavaScript teams.

JavaScript has an amazing ecosystem. I'm able to hack on a mobile application with React Native or Expo in seconds. And if I want to develop desktop applications, I can do it with Tauri or Electron. And I also can write server application servers code with either Deno, Node.js, or bin.

But there is not a single runtime which allows me to port my server logic onto the mobile and viz versa. For instance, let's say that I have an NPM module dedicated to cryptographic work. It does some CPU-intensive work, file system operation, and interact with the network stack. I use it on my back end, and I really need to reuse it and reuse that core logic as a backend.

I can't port that logic directly into a React Native application. So if I use Deno, Node.js, or bin, I won't be able to port the logic directly into React Native. And on the other side, I cannot hire a native developer to reimplement that logic in Swift or Kotlin. And then write a binding to React Native, because it will cost me a lot of money. And maybe I have a lot of JavaScript developers in my team, and I cannot hire this kind of specific profile.

2. Mobile Code Portability Challenges

Short description:

Mobile dominance necessitates code portability. Node.js, Deno.js, or bin.js limitations on mobile explored. Bear emerges as a versatile runtime for iOS, Android, React Native, and Expo. Bear allows selective module integration, unlike Node.js. Mobile app development with Bear simplifies module usage in React Native.

And I would like to push myself to ask a question. Mobile is everywhere. Over 90% of mobile time is spent in apps and not in browsers. And for the next billion users, the smartphone is the entire Internet. And then running code natively on low-end devices is not an option. It's necessary because everyone has a phone in their pocket. And it's like the real devices where you have to be, even in JavaScript.

So I asked myself why Node.js, Deno.js, or bin.js does not run on mobile. And before really seeing that, let's just do a quick check. So in that table, I tried to compare Node.js, Deno.js, and bin.js when it comes to mobile. So first, we'll see that Deno.js and bin.js are out of the scope. There are still Node.js mobile packages, which are third-party packages not maintained by the core maintainers or by Node.js itself. The real bad point with that is that when you want to embed your Node.js code, you have to bring the whole Node.js codebase.

Also, it supports React Native, not Expo, and also it didn't have a kind of native integration with iOS or Android, for instance. Let's try to take a look at Bear now. So Bear is a modern runtime. And by design, we can use Bear on iOS and Android. It supports different kinds of engines. And regarding the framework support, it supports React Native, Expo, and also has native integration. And the really big difference is that you can finally opt into your module.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

How Bun Makes Building React Apps Simpler & Faster
React Day Berlin 2022React Day Berlin 2022
9 min
How Bun Makes Building React Apps Simpler & Faster
Top Content
BUN is a modern all-in-one JavaScript runtime environment that achieves new levels of performance. It includes BUN dev, a fast front-end dev server, BUN install, a speedy package manager, and BUN run, a fast package runner. BUN supports JSX, has optimized React server-side rendering, and offers hot module reloading on the server. The priorities for BUN include stability, node compatibility, documentation improvement, missing features in BUN install, AST plugin API, native Windows support, Bundler and Minifier optimization, and easier deployment to production. BUN's AST plugin API allows for bundle-time JavaScript execution and embedding code, potentially inspiring new frameworks.
Never Worry About CORS Again
JSNation US 2025JSNation US 2025
28 min
Never Worry About CORS Again
Talk on Bund: Overview of Bund, its speed optimization, components like runtime, package manager, test runner, and bundler. Efficient features include fast npm manager, pnpm lockfile support, Jest-compatible test runner, and optimized runtime components. Built-in features like modern password hashing, WebSocket server, file glob API, and database clients. API design focuses on common use cases and optimization. Enhanced JavaScript functionality with SIMD, native code, and performance improvements. Challenges in JavaScript productivity, BUN adoption, deployment, and support. React support, community involvement, security, Next.js compatibility, and transition.
Node.js Compatibility in Deno
Node Congress 2022Node Congress 2022
34 min
Node.js Compatibility in Deno
Deno aims to provide Node.js compatibility to make migration smoother and easier. While Deno can run apps and libraries offered for Node.js, not all are supported yet. There are trade-offs to consider, such as incompatible APIs and a less ideal developer experience. Deno is working on improving compatibility and the transition process. Efforts include porting Node.js modules, exploring a superset approach, and transparent package installation from npm.
Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch - Understand magic behind Node.js
Node Congress 2023Node Congress 2023
29 min
Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch - Understand magic behind Node.js
Top Content
The Talk explores the magic behind Node.js and delves into its components, including V8, libuv, and the C++ bridge. It discusses the workflow and execution process, the use of NodeMod, and the understanding of console functions. The Talk also covers Node.js functions and scheduling, the introduction of runtimes, and the collaboration between JavaScript runtimes. It concludes with insights on content production, the choice of Node.js, and the inspiration behind it.
Eval all the strings! - Hardened JavaScript
Node Congress 2023Node Congress 2023
8 min
Eval all the strings! - Hardened JavaScript
NPM packages can be potentially dangerous, so it's important to be proactive in managing them. Lava Mode allows you to detect and investigate suspicious packages before deploying your app. Lavamote prevents unauthorized access to sensitive resources by isolating dependencies and using hardened JavaScript. Lava Mode makes it easier to analyze obfuscated files and understand their actions.
Roll you own JavaScript runtime
Node Congress 2023Node Congress 2023
21 min
Roll you own JavaScript runtime
This Talk introduces Deno, a custom JavaScript runtime similar to Node.js, and discusses the benefits of using a custom runtime. It explores the process of building a custom runtime with Deno in Rust, including the integration with Cargo and the ability to mix and match crates and APIs. The Talk also covers the implementation of the setTimeout function in both Run.js and Runtime.js, and provides examples of how to fix errors and implement additional functions. Overall, the Talk highlights the flexibility and possibilities of creating custom runtimes with Deno.

Workshops on related topic

Build Peer-to-Peer Applications with Pear Runtime
JSNation 2024JSNation 2024
152 min
Build Peer-to-Peer Applications with Pear Runtime
WorkshopFree
David Mark Clements
David Mark Clements
Learn how to rapidly build peer-to-peer applications with Pear Runtime. No servers required. Understand peer-to-peer paradigms and construct applications from well-defined building blocks. This workshop will cover how to create both Desktop and Terminal applications (with discussion for Mobile) that work entirely peer-to-peer from anywhere in the world. By the end of this workshop you should know how to build a new type of highly scalable application with entirely reduced infrastructural costs (~0) along with suitable architectures and best practices for peer-to-peer applications. From the creator of Pear Runtime and the company that brings us keet.io. Table of content:- Introducing Pear- Initial Q & A- Getting Setup- Creating a Pear Desktop Application- Sharing a Pear Application- Running a Pear Application- Creating a Pear Terminal Application- Releasing a Pear Application- Architectural Discussions- Wrap-up Q & A