diff --git a/docs/develop/local_dev.mdx b/docs/develop/local_dev.mdx index 4291570e..3a8bd7a2 100644 --- a/docs/develop/local_dev.mdx +++ b/docs/develop/local_dev.mdx @@ -3,64 +3,83 @@ sidebar_position: 2 description: "Learn how to set up your local dev environment" --- -import {CodeWithTabs} from "../../src/components/code/code"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; import Admonition from '@theme/Admonition'; -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; +import {CodeWithTabs} from "../../src/components/code/code"; import {TextAndCode} from "../../src/components/code/code/text-and-code"; # Local Dev ## Running Restate Server & CLI locally +Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: - ```shell !!tabs MacOS-x64 - BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ chmod +x restate restate-server && \ - # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): - sudo mv restate $BIN && \ - sudo mv restate-server $BIN + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN ``` - ```shell !!tabs MacOS-arm64 - BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ chmod +x restate restate-server && \ - # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): - sudo mv restate $BIN && \ - sudo mv restate-server $BIN + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN ``` - ```shell !!tabs Linux-x64 - BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ chmod +x restate restate-server && \ - # Move the binaries to a directory in your PATH, for example ~/.local/bin: - mv restate $BIN && \ - mv restate-server $BIN + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN ``` - ```shell !!tabs Linux-arm64 - BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ chmod +x restate restate-server && \ - # Move the binaries to a directory in your PATH, for example ~/.local/bin: - mv restate $BIN && \ - mv restate-server $BIN + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN ``` + Then run the Restate Server with: @@ -69,45 +88,19 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code"; ``` - - - Install Restate Server and run it with: - - ```shell !result - brew install restatedev/tap/restate-server && - restate-server - ``` - - - - Install the CLI via: - - ```shell !result - brew install restatedev/tap/restate - ``` - - - Install Restate Server and run it: + Install Restate Server and CLI via: ```shell !result npm install --global @restatedev/restate-server@latest && - restate-server - ``` - - - Or use npx, without installation: - - ```shell !result - npx @restatedev/restate-server + npm install --global @restatedev/restate@latest ``` - Install the Restate CLI via: - + Then run the Restate Server with: ```shell !result - npm install --global @restatedev/restate@latest + restate-server ``` diff --git a/docs/get_started/quickstart.mdx b/docs/get_started/quickstart.mdx index 479ee6de..b0792f1e 100644 --- a/docs/get_started/quickstart.mdx +++ b/docs/get_started/quickstart.mdx @@ -9,29 +9,175 @@ import TabItem from '@theme/TabItem'; import Admonition from '@theme/Admonition'; import {Step} from "../../src/components/Stepper"; import {CodeWithTabs} from "../../src/components/code/code"; +import {TextAndCode} from "../../src/components/code/code/text-and-code"; # Quickstart This guide takes you through your first steps with Restate. - + + - - TypeScript: Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.6.7 - - [Install the Restate Server & CLI](/develop/local_dev#running-restate-server--cli-locally) + - [NodeJS](https://nodejs.org/en/) >= v18.17.1 + - [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.6.7 - - - Download the [Node template](https://github.com/restatedev/node-template-generator) with a skeleton of a Restate service. And install its dependencies: - - ```shell - npx -y @restatedev/create-app@latest && cd restate-node-template && \ - npm install - ``` + + Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: + + + + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + + + Then run the Restate Server with: + ```shell + restate-server + ``` + + + + + Install Restate Server and CLI via: + + ```shell !result + npm install --global @restatedev/restate-server@latest && + npm install --global @restatedev/restate@latest + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + + To run the Restate Server: + + ```shell + docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ + --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION + ``` + + To run commands with the Restate CLI, use the following command: + + ```shell + docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls + ``` + + Replace `invocations ls` by the CLI command you want to run. + + + + + + + Select your favorite runtime: + + Node.jsNode.js}> + + ```shell !!tabs CLI + restate example typescript-hello-world && + cd typescript-hello-world && + npm install + ``` + + ```shell !!tabs npx + npx -y @restatedev/create-app@latest && cd restate-node-template && + npm install + ``` + + + bunbun}> + ```shell + restate example typescript-bun-hello-world && + cd typescript-bun-hello-world && + npm install + ``` + + denoDeno}> + ```shell + restate example typescript-deno-hello-world && + cd typescript-deno-hello-world && + npm install + ``` + + Cloudflare WorkersCloudflare Workers}> + ```shell + restate example typescript-cloudflare-worker-hello-world && + cd typescript-cloudflare-worker-hello-world && + npm install + ``` + + - + Now, start developing your service in `src/app.ts`. Run it with [`ts-node-dev`](https://www.npmjs.com/package/ts-node-dev), and let it listen on port `9080` for requests: @@ -41,15 +187,6 @@ This guide takes you through your first steps with Restate. - - Restate is a single self-contained binary. No external dependencies needed. Once you have [installed the Restate Server](/develop/local_dev#running-restate-server--cli-locally), run it locally via: - - ```shell - restate-server - ``` - - - Tell Restate where the service is running, so Restate can discover and register the services and handlers behind this endpoint: @@ -66,11 +203,7 @@ This guide takes you through your first steps with Restate. ``` - - If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. -
- Output ```shell @@ -88,7 +221,7 @@ This guide takes you through your first steps with Restate. ```
- + If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`.
@@ -116,29 +249,179 @@ This guide takes you through your first steps with Restate.
- + - Java: [JDK](https://whichjdk.com/) >= 11 - - [Install the Restate Server & CLI](/develop/local_dev#running-restate-server--cli-locally) - - - - ```shell !!tabs CLI - restate example java-hello-world-gradle && - cd java-hello-world-gradle - ``` - - ```shell !!tabs wget - wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-gradle.zip && - unzip java-hello-world-gradle.zip -d java-hello-world-gradle && - rm java-hello-world-gradle.zip && cd java-hello-world-gradle - ``` - - + + Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: + + + + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + + + Then run the Restate Server with: + ```shell + restate-server + ``` + + + + + To run the Restate Server: + + ```shell + docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ + --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION + ``` + + To run commands with the Restate CLI, use the following command: + + ```shell + docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls + ``` + + Replace `invocations ls` by the CLI command you want to run. + + + + + + Build tool: + + MavenMaven}> + Architecture: + + Spring BootSpring Boot}> + + ```shell !!tabs CLI + restate example java-hello-world-maven-spring-boot && + cd java-hello-world-maven-spring-boot + ``` + + ```shell !!tabs wget + wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-maven-spring-boot.zip && + unzip java-hello-world-maven-spring-boot.zip -d java-hello-world-maven-spring-boot && + rm java-hello-world-maven-spring-boot.zip && cd java-hello-world-maven-spring-boot + ``` + + + QuarkusQuarkus}> + + ```shell !!tabs CLI + restate example java-hello-world-maven-quarkus && + cd java-hello-world-maven-quarkus + ``` + + ```shell !!tabs wget + wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-maven-quarkus.zip && + unzip java-hello-world-maven-quarkus.zip -d java-hello-world-maven-quarkus && + rm java-hello-world-maven-quarkus.zip && cd java-hello-world-maven-quarkus + ``` + + + VanillaVanilla}> + + ```shell !!tabs CLI + restate example java-hello-world-maven && + cd java-hello-world-maven + ``` + + ```shell !!tabs wget + wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-maven.zip && + unzip java-hello-world-maven.zip -d java-hello-world-maven && + rm java-hello-world-maven.zip && cd java-hello-world-maven + ``` + + + + + GradleGradle}> + Architecture: + + VanillaVanilla}> + + ```shell !!tabs CLI + restate example java-hello-world-gradle && + cd java-hello-world-gradle + ``` + + ```shell !!tabs wget + wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-gradle.zip && + unzip java-hello-world-gradle.zip -d java-hello-world-gradle && + rm java-hello-world-gradle.zip && cd java-hello-world-gradle + ``` + + + + + - + You are all set to start developing your service. Open the project in an IDE and configure it to build with Gradle. @@ -150,15 +433,6 @@ This guide takes you through your first steps with Restate. - - Restate is a single self-contained binary. No external dependencies needed. Once you have [installed the Restate Server](/develop/local_dev#running-restate-server--cli-locally), run it locally via: - - ```shell - restate-server - ``` - - - Tell Restate where the service is running, so Restate can discover and register the services and handlers behind this endpoint: @@ -176,8 +450,6 @@ This guide takes you through your first steps with Restate. - If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. -
Output @@ -198,6 +470,8 @@ This guide takes you through your first steps with Restate.
+ If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. +
@@ -223,14 +497,109 @@ This guide takes you through your first steps with Restate.
- + - Java/Kotlin: [JDK](https://whichjdk.com/) >= 11 - - [Install the Restate Server & CLI](/develop/local_dev#running-restate-server--cli-locally) - + + Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: + + + + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + + + Then run the Restate Server with: + ```shell + restate-server + ``` + + + + + To run the Restate Server: + + ```shell + docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ + --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION + ``` + + To run commands with the Restate CLI, use the following command: + + ```shell + docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls + ``` + + Replace `invocations ls` by the CLI command you want to run. + + + + + @@ -248,7 +617,7 @@ This guide takes you through your first steps with Restate. - + You are all set to start developing your service. Open the project in an IDE and configure it to build with Gradle. @@ -259,16 +628,6 @@ This guide takes you through your first steps with Restate. ``` - - - Restate is a single self-contained binary. No external dependencies needed. Once you have [installed the Restate Server](/develop/local_dev#running-restate-server--cli-locally), run it locally via: - - ```shell - restate-server - ``` - - - Tell Restate where the service is running, so Restate can discover and register the services and handlers behind this endpoint: @@ -286,8 +645,6 @@ This guide takes you through your first steps with Restate. - If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. -
Output @@ -308,6 +665,8 @@ This guide takes you through your first steps with Restate.
+ If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. +
@@ -339,10 +698,106 @@ This guide takes you through your first steps with Restate. - Go: >= 1.21.0 - - [Install the Restate Server & CLI](/develop/local_dev#running-restate-server--cli-locally) - + + Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: + + + + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + + + Then run the Restate Server with: + ```shell + restate-server + ``` + + + + + To run the Restate Server: + + ```shell + docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ + --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION + ``` + + To run commands with the Restate CLI, use the following command: + + ```shell + docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls + ``` + + Replace `invocations ls` by the CLI command you want to run. + + + + + + @@ -360,7 +815,7 @@ This guide takes you through your first steps with Restate. - + Now, start developing your service in `greeter.go`. Run it with: ```shell @@ -370,15 +825,6 @@ This guide takes you through your first steps with Restate. - - Restate is a single self-contained binary. No external dependencies needed. Once you have [installed the Restate Server](/develop/local_dev#running-restate-server--cli-locally), run it locally via: - - ```shell - restate-server - ``` - - - Tell Restate where the service is running, so Restate can discover and register the services and handlers behind this endpoint: @@ -396,8 +842,6 @@ This guide takes you through your first steps with Restate. - If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. -
Output @@ -418,6 +862,8 @@ This guide takes you through your first steps with Restate.
+ If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. +
@@ -444,14 +890,108 @@ This guide takes you through your first steps with Restate.
- + - Python >= v3.11 - - [Install the Restate Server & CLI](/develop/local_dev#running-restate-server--cli-locally) - - + + Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: + + + + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + + + Then run the Restate Server with: + ```shell + restate-server + ``` + + + + + To run the Restate Server: + + ```shell + docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ + --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION + ``` + + To run commands with the Restate CLI, use the following command: + + ```shell + docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls + ``` + + Replace `invocations ls` by the CLI command you want to run. + + + + + ```shell !!tabs CLI @@ -468,7 +1008,7 @@ This guide takes you through your first steps with Restate. - + Create a `venv` and install the requirements: @@ -486,15 +1026,6 @@ This guide takes you through your first steps with Restate. - - Restate is a single self-contained binary. No external dependencies needed. Once you have [installed the Restate Server](/develop/local_dev#running-restate-server--cli-locally), run it locally via: - - ```shell - restate-server - ``` - - - Tell Restate where the service is running, so Restate can discover and register the services and handlers behind this endpoint: @@ -549,31 +1080,146 @@ This guide takes you through your first steps with Restate. - + - [Rust](https://rustup.rs/) - - [Install the Restate Server & CLI](/develop/local_dev#running-restate-server--cli-locally) - - - - ```shell !!tabs CLI - restate example rust-hello-world && - cd rust-hello-world - ``` - - ```shell !!tabs wget - wget https://github.com/restatedev/examples/releases/latest/download/rust-hello-world.zip && - unzip rust-hello-world.zip -d rust-hello-world && - rm rust-hello-world.zip && cd rust-hello-world - ``` - - + + Restate is a single self-contained binary. No external dependencies needed. + + + + Install Restate Server and CLI via: + + ```shell !result + brew install restatedev/tap/restate-server && + brew install restatedev/tap/restate + ``` + + + Then run the Restate Server with: + ```shell !result + restate-server + ``` + + + + Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable: + + + + ```shell !!tabs Linux-x64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs Linux-arm64 + BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example ~/.local/bin: + mv restate $BIN && \ + mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-x64 + BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + ```shell !!tabs MacOS-arm64 + BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \ + curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \ + tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \ + chmod +x restate restate-server && \ + + # Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo): + sudo mv restate $BIN && \ + sudo mv restate-server $BIN + ``` + + + + Then run the Restate Server with: + ```shell + restate-server + ``` + + + + + To run the Restate Server: + + ```shell + docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ + --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION + ``` + + To run commands with the Restate CLI, use the following command: + + ```shell + docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls + ``` + + Replace `invocations ls` by the CLI command you want to run. + + + + + + + Select your favorite runtime: + + TokioTokio}> + + ```shell !!tabs CLI + restate example rust-hello-world && + cd rust-hello-world + ``` + + ```shell !!tabs wget + wget https://github.com/restatedev/examples/releases/latest/download/rust-hello-world.zip && + unzip rust-hello-world.zip -d rust-hello-world && + rm rust-hello-world.zip && cd rust-hello-world + ``` + + + + ShuttleShuttle}> + + ```shell !!tabs CLI + restate example rust-shuttle-hello-world && + cd rust-shuttle-hello-world + ``` + + ```shell !!tabs wget + wget https://github.com/restatedev/examples/releases/latest/download/rust-shuttle-hello-world.zip && + unzip rust-shuttle-hello-world.zip -d rust-shuttle-hello-world && + rm rust-shuttle-hello-world.zip && cd rust-shuttle-hello-world + ``` + + + + - + Use `cargo run` to build and run the example: @@ -583,15 +1229,6 @@ This guide takes you through your first steps with Restate. - - Restate is a single self-contained binary. No external dependencies needed. Once you have [installed the Restate Server](/develop/local_dev#running-restate-server--cli-locally), run it locally via: - - ```shell - restate-server - ``` - - - Tell Restate where the service is running, so Restate can discover and register the services and handlers behind this endpoint: @@ -609,8 +1246,6 @@ This guide takes you through your first steps with Restate. - If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. -
Output @@ -631,6 +1266,8 @@ This guide takes you through your first steps with Restate.
+ If you run Restate with Docker, use `http://host.docker.internal:9080` instead of `http://localhost:9080`. +
diff --git a/src/css/custom.css b/src/css/custom.css index ed2b3cd6..07e45cb0 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -430,4 +430,32 @@ ol { margin-inline-end: 0px; padding-inline-start: 40px; unicode-bidi: isolate; -} \ No newline at end of file +} + +/* Add this to your CSS file */ +.selection-button { + margin: 1rem 0; + gap: 1rem; +} + +.selection-button .tabs__item { + border: 1px solid var(--ifm-color-secondary); + border-radius: 8px; + padding: 0.2rem 0.5rem; + cursor: pointer; +} + +.selection-button .tabs__item--active { + color: var(--ifm-color-secondary-darker); + background-color: var(--ifm-color-secondary-light); + border-color: var(--ifm-color-secondary-darker); +} + +/* Add this to your CSS file */ +.icon { + width: 24px; + height: 24px; + margin-right: 8px; + margin-bottom: 0; + vertical-align: middle; +} diff --git a/static/img/quickstart/bun.svg b/static/img/quickstart/bun.svg new file mode 100644 index 00000000..531b2b73 --- /dev/null +++ b/static/img/quickstart/bun.svg @@ -0,0 +1,26 @@ + + + bun + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/quickstart/cloudflare_workers.svg b/static/img/quickstart/cloudflare_workers.svg new file mode 100644 index 00000000..023d4eb0 --- /dev/null +++ b/static/img/quickstart/cloudflare_workers.svg @@ -0,0 +1 @@ + diff --git a/static/img/quickstart/deno.svg b/static/img/quickstart/deno.svg new file mode 100644 index 00000000..5bb4f844 --- /dev/null +++ b/static/img/quickstart/deno.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/static/img/quickstart/gradle.svg b/static/img/quickstart/gradle.svg new file mode 100644 index 00000000..fb75dfee --- /dev/null +++ b/static/img/quickstart/gradle.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/img/quickstart/java.svg b/static/img/quickstart/java.svg new file mode 100644 index 00000000..ed92b9a7 --- /dev/null +++ b/static/img/quickstart/java.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/quickstart/maven.svg b/static/img/quickstart/maven.svg new file mode 100644 index 00000000..6a5e1b02 --- /dev/null +++ b/static/img/quickstart/maven.svg @@ -0,0 +1,2 @@ + +file_type_maven \ No newline at end of file diff --git a/static/img/quickstart/nodejs.svg b/static/img/quickstart/nodejs.svg new file mode 100644 index 00000000..ec5b3096 --- /dev/null +++ b/static/img/quickstart/nodejs.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/img/quickstart/quarkus.svg b/static/img/quickstart/quarkus.svg new file mode 100644 index 00000000..be721de2 --- /dev/null +++ b/static/img/quickstart/quarkus.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/quickstart/shuttle-rust.png b/static/img/quickstart/shuttle-rust.png new file mode 100644 index 00000000..0ec7bfc4 Binary files /dev/null and b/static/img/quickstart/shuttle-rust.png differ diff --git a/static/img/quickstart/spring.svg b/static/img/quickstart/spring.svg new file mode 100644 index 00000000..4f70f0b7 --- /dev/null +++ b/static/img/quickstart/spring.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/img/quickstart/tokio.svg b/static/img/quickstart/tokio.svg new file mode 100644 index 00000000..0085dbad --- /dev/null +++ b/static/img/quickstart/tokio.svg @@ -0,0 +1,37 @@ + + + + Mark Copy + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file