Skip to content

Commit

Permalink
feat: bump wws to 1.1.0. Add mount folders docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelmmiguel committed Mar 22, 2023
1 parent e10ffed commit a2ce3bb
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 20 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = { workspace = true }

# Common package definition for all crates / kits
[workspace.package]
version = "1.0.1"
version = "1.1.0"
edition = "2021"
authors = [ "Wasm Labs <https://wasmlabs.dev>" ]
license = "Apache-2.0"
Expand Down
33 changes: 33 additions & 0 deletions docs/docs/features/mount-folders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Mount folders

Wasm Workers Server allows you to mount folders in the workers' execution context so they can access the files inside. This configuration is done through the `TOML` file associated to a worker (a `TOML` file with the same filename as the worker). **This means every worker has its own set of mount folders**.

The following `TOML` config file mounts the `_libs` folder so the worker can access it:

```toml
version = "1"

[[folders]]
from = "./_libs"
to = "/mnt/libs"
```

If your worker requires more than one folder, you can mount multiple ones:

```toml
version = "1"

[[folders]]
from = "./_libs"
to = "/mnt/libs"

[[folders]]
from = "./_assets"
to = "/mnt/assets"
```

## Avoid wws looking for workers in folders

In the previous example, all folders starts with an underscore character (`_`). This folder name convention tells `wws` to ignore any file inside it when detecting available workers.

Note that those folders may include files that `wws` recognizes as workers (like `.js` or `.py`). By prefixing those folders with an `_`, you ensure `wws` won't process those files as workers.
9 changes: 5 additions & 4 deletions kits/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "wasm-workers-rs"
version = "1.0.1"
edition = "2021"
license = "Apache-2.0"
homepage = "https://workers.wasmlabs.dev/"
documentation = "https://workers.wasmlabs.dev/docs/intro"
repository = "https://github.com/vmware-labs/wasm-workers-server/"
version = { workspace = true }
edition = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[lib]
path = "src/lib.rs"
Expand Down
9 changes: 5 additions & 4 deletions kits/rust/worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "worker"
version = "1.0.1"
edition = "2021"
license = "Apache-2.0"
homepage = "https://workers.wasmlabs.dev/"
documentation = "https://workers.wasmlabs.dev/docs/intro"
repository = "https://github.com/vmware-labs/wasm-workers-server/"
version = { workspace = true }
edition = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
Expand Down

0 comments on commit a2ce3bb

Please sign in to comment.