A real-time server component of AnyCable (open-source edition). Check out also our Pro and managed offerings.
Note
You can find all the necessary information about AnyCable in our documentation: docs.anycable.io.
There are several ways to install AnyCable server:
-
On MacOS, you can install AnyCable via Homebrew:
brew install anycable-go
-
Docker images are available on Docker Hub.
-
For Rails projects, we recommend using our
bin/rails g anycable:bin
installer for local development. -
For JavaScript projects, we recommend installing AnyCable via NPM:
npm install --save-dev @anycable/anycable-go pnpm install --save-dev @anycable/anycable-go yarn add --dev @anycable/anycable-go # and run as follows npx anycable-go
-
You can use heroku-anycable-go buildpack for Heroku deployments.
-
Arch Linux users can install anycable-go package from AUR.
-
Or you can download a binary from the releases page:
# Example for `anycable-go-linux-amd64` curl -fsSL https://github.com/anycable/anycable-go/releases/latest/download/anycable-go-linux-amd64 -o anycable-go chmod +x anycable-go ./anycable-go -v
-
Of course, you can install it from source too:
go install github.com/anycable/anycable-go/cmd/anycable-go@latest
Run server:
$ anycable-go
2024-10-09 11:00:01.402 INF Starting AnyCable 1.5.3-f39ff3f (pid: 85844, open file limit: 122880, gomaxprocs: 8) nodeid=E4eFyM
For more information about available options run anycable-go -h
or check out the documentation.
# first, prepare mruby (we embed it by default)
# NOTE: Might require running with sudo, since we build artifacts within a Go module
make prepare-mruby
# then build the Go binary (will be available in dist/anycable-go)
make
You can run tests with the following commands:
# Run Golang unit tests
make test
# Run once
make prepare
# Run integrations tests
make test-conformance
# Run integration benchmarks
go install github.com/anycable/websocket-bench@latest
make benchmarks
We use golangci-lint to lint Go source code:
make lint
Bug reports and pull requests are welcome on GitHub at https://github.com/anycable/anycable-go.
Please, provide reproduction script (using this template) when submitting bugs if possible.
The library is available as open source under the terms of the MIT License.
To report a security vulnerability, please contact us at [email protected]
. We will coordinate the fix and disclosure.