Web Developers use Socket runtime
to create apps for any OS, desktop, and mobile. You can use plain old HTML, CSS, and JavaScript, as well as your favorite front-end libraries like Next.js, React, Svelte, or Vue.
The Socket runtime CLI
outputs hybrid native-web apps that combine your code with the runtime. Your code is rendered using the OS's native "WebView" component. Platform features are implemented natively and made available to the JavaScript environment in a way that is secure and fully sandboxed on every platform. Native APIs like Bluetooth and UDP make local-first and peer-to-peer software design patterns as first class considerations.
[!NOTE] Socket supports many of the Node.js APIs. It is NOT a drop in replacement for Node.js, nor will it ever be since socket is for building software and node.js is for building servers. Below is a high level overview of partially supported APIs and modules.
Module | Node.js | Socket |
---|---|---|
assert | ✔︎ | ⏱ |
async/await | ✔︎ | ✔︎ |
buffer | ✔︎ | ✔︎️ |
child_process | ✔︎ | ✔︎️ * |
console | ✔︎ | ✔︎ |
crypto | ✔︎ | ✔︎ * |
dgram | ✔︎ | ✔︎️ |
dns | ✔︎ | ✔︎️ |
os | ✔︎ | ✔︎️ |
encoding | ✔︎ | ✔︎ |
events | ✔︎ | ✔︎ |
fetch | ✔︎ | ✔︎ |
fs/promises | ✔︎ | ✔︎ |
fs | ✔︎ | ✔︎ |
path | ✔︎ | ✔︎ |
process | ✔︎ | ✔︎ |
streams | ✔︎ | ✔︎ |
string_decoder | ✔︎ | ⏱ |
test | ✔︎ | ✔︎️ |
timers | ✔︎ | ⏱ |
uuid | ✔︎ | ⏱ |
vm | ✔︎ | ✔︎ |
ESM | ✔︎ | ✔︎ |
CJS | ✔︎ | ✔︎ |
URL | ✔︎ | ✔︎ |
⏱ = planned support * = Supported but Works differently; may be refactored to match the nodejs API ** = Use fetch instead
Check the FAQs on our Website to learn more.
Create Socket App
is similar to React's Create React App
, we provide a few basic boilerplates and some strong opinions so you can get coding on a production-quality app as quickly as possible.
Please check create-socket-app Repo to get started and to learn more.
You can also check our Examples
in the Examples Repo.
The full documentation can be found on the Socket Runtime website.
The Socket Runtime
documentation covers Socket APIs, includes examples, multiple guides (Apple
, Desktop
, and Mobile
), P2P
documentation, and more.
Socket
provides a built-in test runner
similar to node:test
which outputs the test results in TAP format.
You can also check test/
for the unit and integration test suite.
We welcome contributions from everyone! Please check our Contribution Guide to learn more.
Don't hesitate to stop by Discord and ask the team about your issue and if someone is already working on it.
Please connect with any current project contributors: @heapwolf, @jwerle, and @chicoxyzzy if you want to contribute to the Socket Runtime
project itself.
Thank you for your interest in reporting/fixing issues and contributing to Socket
!