Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up the docs for registry and runtime #110

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Welcome to the Wasmer Documentation! 👋
## Ecosystem

1. [Wasmer Runtime](/runtime): allows running Wasmer containers anywhere
2. [Wasmer Registry](/registry): explore containers from the community and distribute your own ones
2. [Wasmer Registry](/registry): explore containers from the community and distribute your own
3. [Wasmer Edge](/edge): run containers on Wasmer distributed Edge infrastructure

<Cards>
Expand All @@ -23,14 +23,15 @@ Welcome to the Wasmer Documentation! 👋

## SDKs

Wasmer is available in multiple programming languages and operating systems.
Wasmer is available in multiple programming languages and operating systems in the shape of SDKs.
Using these SDKs, it's possible to embedd wasmer modules compiled from other languages into your application.
We have set up the SDKs to allow using Wasmer easily anywhere:

* [Wasmer JavaScript SDK](/sdk/wasmer-js): run your Wasmer packages in Javascript

## Social

For the latest articles on Wasmer features and developments, check out [our blog](https://wasmer.io/posts) or [follow us on Twitter](https://twitter.com/wasmerio)!
For the latest articles on Wasmer features and developments, check out [our blog](https://wasmer.io/posts) or [follow us on X](https://x.com/wasmerio)!
You can also chat with us using [Wasmer Discord channel](https://discord.com/invite/qBTfsNP7N8).

Let's now dig deeper into how to install Wasmer, shall we? 🙂
2 changes: 1 addition & 1 deletion pages/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Callout } from "nextra-theme-docs";
import { Tabs, Tab } from "nextra-theme-docs";

Wasmer allows you to run applications either **Standalone** (_via the CLI_) or **Embedded** within [other languages](./#wasmer-language-integrations) such as C/C++, Rust, Python, Go, PHP, Ruby...
Wasmer allows you to run applications either **Standalone** (_via the CLI_) or **Embedded** within [other languages](./#sdks) such as C/C++, Rust, Python, Go, PHP, Ruby...

<Tabs items={['CLI (Bash)', 'CLI (PowerShell)', 'JS' /*, 'Python' */]}>
<Tab>
Expand Down
96 changes: 81 additions & 15 deletions pages/registry/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import { Callout } from "nextra-theme-docs";

Creating a package is very simple, just run:

```bash
```bash copy
wasmer init
```

### Publish a package to Wasmer

Once you set up the values in your [`wasmer.toml` manifest](/registry/manifest), publishing a package to Wasmer is as simple as running the following command:

```bash
```bash copy
wasmer publish
```

Expand All @@ -32,7 +32,7 @@ This command will create your Wasmer package, and publish it to the Wasmer regis

If you want to check that everything is running properly before publishing, you can run `--dry-run`:

```bash
```bash copy
wasmer publish --dry-run
```

Expand All @@ -47,45 +47,111 @@ You can set the configuration for the registry very easily.
### `registry.url`: Registry URL

Get:
```
```bash copy
wasmer config get registry.url
```

Set:
```
``` bash copy
wasmer config set registry.url https://registry.wasmer.io/graphql
```

## Help

This is the help output from the Wasmer CLI for `wasmer publish --help`:
This is the help output from the Wasmer CLI for `wasmer publish --help` (last updated 2025-01):

```
Usage: wasmer publish [OPTIONS] [PACKAGE_PATH]
Publish a package to a registry [alias: package publish]

Usage: wasmer publish [OPTIONS] [path]

Arguments:
[PACKAGE_PATH]
[path]
Directory containing the `wasmer.toml`, or a custom *.toml manifest file.

Defaults to current working directory.

[default: .]

Options:
--wasmer-dir <WASMER_DIR>
Set Wasmer's home directory

[env: WASMER_DIR=/home/imago/.local/share/wasmenv/current]
[default: /home/imago/.local/share/wasmenv/current]

--cache-dir <CACHE_DIR>
The directory cached artefacts are saved to

[env: WASMER_CACHE_DIR=/home/imago/.wasmer/cache]
[default: /home/imago/.local/share/wasmenv/current/cache]

-v, --verbose...
Generate verbose output (repeat for more verbosity)

--registry <REGISTRY>
Registry to publish to
The registry to fetch packages from (inferred from the environment by default)

[env: WASMER_REGISTRY=]

--log-format <LOG_FORMAT>
The format to use when generating logs

[env: LOG_FORMAT=]
[default: text]

Possible values:
- text: Human-readable logs
- json: Machine-readable logs

--token <TOKEN>
The API token to use when communicating with the registry (inferred from the environment by default)

[env: WASMER_TOKEN=wap_1f8cd65ed491ab8087f54f8078f389a7bb6e7236c808aac61a487b4236f90d2f]

--color <COLOR>
When to display colored output

[default: auto]
[possible values: auto, always, never]

--dry-run
Run the publish logic without sending anything to the registry server

--quiet
Run the publish command without any output
--package-name <PACKAGE_NAME>
Override the package of the uploaded package in the wasmer.toml
--version <VERSION>
Override the package version of the uploaded package in the wasmer.toml

--token <TOKEN>
Override the token (by default, it will use the current logged in user)
--namespace <PACKAGE_NAMESPACE>
Override the namespace of the package to upload

--name <PACKAGE_NAME>
Override the name of the package to upload

--version <PACKAGE_VERSION>
Override the package version of the uploaded package in the wasmer.toml

--no-validate
Skip validation of the uploaded package

--wait[=<WAIT>]
Wait for package to be available on the registry before exiting

[default: none]
[possible values: none, container, native-executables, bindings, all]

--timeout <TIMEOUT>
Timeout (in seconds) for the publish query to the registry.

Note that this is not the timeout for the entire publish process, but for each individual query to the registry during the publish flow.

[default: 5m]

--bump
Whether or not the patch field of the version of the package - if any - should be bumped

--non-interactive
Do not prompt for user input

-h, --help
Print help (see a summary with '-h')
```
8 changes: 5 additions & 3 deletions pages/registry/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module = '<your-module>'

You can check the manifest format here: [Wasmer Package Manifest](/registry/manifest).

The **`wasmer.toml`** file is in the **Wasmer** ecosystem what a **`package.json`** is in the **Node** ecosystem, or **`pyproject.toml`** in the **Python** ecosystem.

<Callout type="info">
Once you have a `wasmer.toml` manifest, you can simply execute `wasmer run` in the CLI to run your package locally.

Expand All @@ -54,7 +56,7 @@ Now, create your WebAssembly modules:
<Tabs items={['Rust (WASIX)', 'Rust (WASI)']}>
<Tab>

```bash
```bash copy
cargo install cargo-wasix
cargo wasix build --release
```
Expand All @@ -63,7 +65,7 @@ Now, create your WebAssembly modules:
<Tab>
WASI is oficially supported by Rust, to compile to it you can simply do:

```bash
```bash copy
rustup target add wasm32-wasi
cargo build --target=wasm32-wasi
```
Expand All @@ -77,7 +79,7 @@ Modify the `wasmer.toml` to point the module to the wasm file location `target/r

Now, simply run:

```bash
```bash copy
wasmer publish
```

Expand Down
4 changes: 2 additions & 2 deletions pages/runtime/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"get-started": "Getting Started",
"cli": "CLI",
"runners": "Runners",
"features": "Features"
"features": "Features",
"runners": "Runners"
}
Loading
Loading