Hello, World— Written by heapwolf
TLDR; Use Socket to build native apps that run on any OS using the web technology you already know and love. Socket also introduces modern network communication protocols that help you scale up and reduce cost.
We help you take the Web beyond the Browser and the Cloud
The Web stack will eat everything
The Web has the largest, most active, and fastest growing developer community. It has the best documentation. It has a massive ecosystem of frameworks, libraries, and well-known design patterns. The Web also has the most companies invested in its success. The Web platform never breaks, this adds some complexity, even warts, but no more so than any other platform. It’s very much a public commons and a labor of love.
The Web has come closer to Write once, Run anywhere than any other platform
since Sun championed the concept in the 90s. Unfortunately, browsers can't and
won't do everything we need. The Web is caught between commercial incentives and
technical innovation. Because of this this, we’ve seen projects like
Cordova welcomed over the years.
The demand for
Universal Apps is strong. It's unreasonable to hire and
retain experts who can build, debug, and maintain codebases for iOS, Android,
MacOS, Linux, Windows, and ChromeOS. Most of us already have Web developers,
DevOps engineers, SREs, etc.
And this is why some of the most popular software to emerge in the last 10 years has been built with non-browser runtimes — Visual Studio Code, Notion, Signal, Slack, and Figma, to name a few.
Why another runtime?
We heard harsh criticisms of the solutions in this space, and thought most of them were valid — none were designed to run on desktop AND mobile. They produce enormous downloads, use significant memory, require learning a new language, and casually diverge from web standards. Their organically evolved APIs can lead to a fractal of complexity. The list goes on.
We saw other opportunities in helping to bring the Web beyond the browser.
People and things want to be connected. Users want to share data. And as AI enters the picture, this demand is only growing. As it grows, so does the cost and complexity of hosting it all in the Cloud.
Outside of the browser we have been able to introduce the necessary primitives to give Web Developers a new class of network connectivity. We're able to provide a full suite of standard unix-like sockets on every OS. Finally, Peer To Peer for Web developers!
How does it compare to other solutions?
|First generation cross-platform for web devs, complex design and extremely large build artifacts.
|First generation (previously called "PhoneGap") Only runs on mobile.
|A fork of Cordova that includes a front-end UI library called Capacitor.
|Aims to be the best library for Rust Developers who want to build GUIs (desktop only at the moment).
Socket is much newer than any of these projects. Being late to market offers a lot of advantages and opportunities for improvement. Here are some very big differences.
It's 100% Web Stack
Behaves like a Web Server
Socket loads your files into the UI in the same way you'd expect a webserver to work, so your website will most likely "just work" as a native app. It's also a secure context, so you have full support for Web Workers, shared array buffers, etc.
Build artifacts are incredibly small
Socket makes the OS's WebView component consistent for web developers. All major operating systems use it to build portions of their own UIs, so we don't need to ship an entire copy of the browser with each application, and we can output a binary that starts at about ±1Mb on desktop, and ±12Mb on mobile.
It's batteries included
Socket is batteries included, not just packaging and code signing, but it supports native extensions but it ships with almost everything you'd ever need. For example, File System, Bluetooth, Geolocation, Notification, i18n, File & Directory Picker (showOpenFilePicker, showSaveFilePicker, showDirectoryPicker) etc.
It's more secure than Tauri, Electron, etc.
It's possible to write Socket apps without a "main" process. All native APIs are controlled though the CSP, allowing the runtime to create a boundary between developer code and the user's operating syetem.
It's dramatically simpler
The "backend" process is optional, but if you need it, it can be written in any language, compiled or interpreted.
It supports modern networking options
Another major goal of the runtime is to help developers keep up with the changing landscape of networked computing. So Socket provides first-class APIs for Peer To Peer networking and Local-First.