From 7799d4ed01ce8944c3a99419f3fdb5edcfdb9a8c Mon Sep 17 00:00:00 2001 From: Boris Mann Date: Tue, 20 Feb 2024 15:40:37 -0800 Subject: [PATCH 1/3] every cli page --- src/content/docs/everycli/index.md | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/content/docs/everycli/index.md diff --git a/src/content/docs/everycli/index.md b/src/content/docs/everycli/index.md new file mode 100644 index 0000000..01d36be --- /dev/null +++ b/src/content/docs/everycli/index.md @@ -0,0 +1,39 @@ +--- +title: Every CLI +description: The Every CLI is a developer tool that includes a local gateway server +--- + +Every CLI is an experimental CLI for developers written in TypeScript. It has a set of convenience functions for interacting with Homestar and the Everywhere Computer control panel. + +More info in the Github repo, including usage: https://github.com/everywhere-computer/every-cli + +## Wasmify + +In order to make an easy experience for JavaScript developers, the Every CLI has a `gen-wasm` function. + +``` +every gen-wasm +``` + +This relies on [ComponentizeJS](https://github.com/bytecodealliance/ComponentizeJS): + +> Provides a Mozilla SpiderMonkey embedding that takes as input a JavaScript source file and a WebAssembly Component using the [WIT format](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md), and outputs a [WebAssembly Component](https://github.com/WebAssembly/component-model) binary with the same interface. + +:::note +We're using this as part of the Wasmtime runtime we use for Homestar. Components and WIT are evolving rapidly. These functions each embed an entire Spidermonkey instance, so will be slower than functions written in Rust and compiled to Wasm. +::: + +## Custom TypeScript Functions + +We are stashing some custom functions written by the Fission team in this repo: https://github.com/everywhere-computer/custom-homestar-functions-ts + +This will eventually migrate to published functions available through the control panel. + + +## API Gateway + +Running the CLI locally will start a Homestar node, API gateway, and local control panel[^ipfs]. + +Integration with Cloudflare Tunnels will expose this as a live public endpoint. This means you can build apps and other experiences that are running on compute from your local Homestar node. + +[^ipfs]: Follow the [setup your local node](/getting-started/setup-your-local-node/#prepare-ipfs) instructions to run IPFS locally. \ No newline at end of file From 7a48aaa87c4695605805527882f583cd6e7df173 Mon Sep 17 00:00:00 2001 From: Boris Mann Date: Tue, 20 Feb 2024 15:46:47 -0800 Subject: [PATCH 2/3] removed command, pointed directly to CLI --- src/content/docs/everycli/index.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/content/docs/everycli/index.md b/src/content/docs/everycli/index.md index 01d36be..24662d0 100644 --- a/src/content/docs/everycli/index.md +++ b/src/content/docs/everycli/index.md @@ -9,11 +9,7 @@ More info in the Github repo, including usage: https://github.com/everywhere-com ## Wasmify -In order to make an easy experience for JavaScript developers, the Every CLI has a `gen-wasm` function. - -``` -every gen-wasm -``` +In order to make an easy experience for JavaScript developers, the Every CLI has a function to "Wasmify" TypeScript source code. This will output a compiled Wasm binary that can be run directly in Everywhere Computer. This relies on [ComponentizeJS](https://github.com/bytecodealliance/ComponentizeJS): From 4e40f51548c997f48d55f3a9094b6e1e67704492 Mon Sep 17 00:00:00 2001 From: Andrew Vivash Date: Tue, 20 Feb 2024 18:21:11 -0800 Subject: [PATCH 3/3] Fix: change TypeScript -> JavaScript and JavaScript -> TypeScript in two sections --- src/content/docs/everycli/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/everycli/index.md b/src/content/docs/everycli/index.md index 24662d0..edb073e 100644 --- a/src/content/docs/everycli/index.md +++ b/src/content/docs/everycli/index.md @@ -3,7 +3,7 @@ title: Every CLI description: The Every CLI is a developer tool that includes a local gateway server --- -Every CLI is an experimental CLI for developers written in TypeScript. It has a set of convenience functions for interacting with Homestar and the Everywhere Computer control panel. +Every CLI is an experimental CLI for developers written in JavaScript. It has a set of convenience functions for interacting with Homestar and the Everywhere Computer control panel. More info in the Github repo, including usage: https://github.com/everywhere-computer/every-cli @@ -13,7 +13,7 @@ In order to make an easy experience for JavaScript developers, the Every CLI has This relies on [ComponentizeJS](https://github.com/bytecodealliance/ComponentizeJS): -> Provides a Mozilla SpiderMonkey embedding that takes as input a JavaScript source file and a WebAssembly Component using the [WIT format](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md), and outputs a [WebAssembly Component](https://github.com/WebAssembly/component-model) binary with the same interface. +> Provides a Mozilla SpiderMonkey embedding that takes as input a TypeScript source file and a WebAssembly Component using the [WIT format](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md), and outputs a [WebAssembly Component](https://github.com/WebAssembly/component-model) binary with the same interface. :::note We're using this as part of the Wasmtime runtime we use for Homestar. Components and WIT are evolving rapidly. These functions each embed an entire Spidermonkey instance, so will be slower than functions written in Rust and compiled to Wasm.