Skip to content

Commit a2ce3bb

Browse files
committed
feat: bump wws to 1.1.0. Add mount folders docs
1 parent e10ffed commit a2ce3bb

File tree

5 files changed

+55
-20
lines changed

5 files changed

+55
-20
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = { workspace = true }
1111

1212
# Common package definition for all crates / kits
1313
[workspace.package]
14-
version = "1.0.1"
14+
version = "1.1.0"
1515
edition = "2021"
1616
authors = [ "Wasm Labs <https://wasmlabs.dev>" ]
1717
license = "Apache-2.0"

docs/docs/features/mount-folders.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Mount folders
2+
3+
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**.
4+
5+
The following `TOML` config file mounts the `_libs` folder so the worker can access it:
6+
7+
```toml
8+
version = "1"
9+
10+
[[folders]]
11+
from = "./_libs"
12+
to = "/mnt/libs"
13+
```
14+
15+
If your worker requires more than one folder, you can mount multiple ones:
16+
17+
```toml
18+
version = "1"
19+
20+
[[folders]]
21+
from = "./_libs"
22+
to = "/mnt/libs"
23+
24+
[[folders]]
25+
from = "./_assets"
26+
to = "/mnt/assets"
27+
```
28+
29+
## Avoid wws looking for workers in folders
30+
31+
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.
32+
33+
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.

kits/rust/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[package]
22
name = "wasm-workers-rs"
3-
version = "1.0.1"
4-
edition = "2021"
5-
license = "Apache-2.0"
63
homepage = "https://workers.wasmlabs.dev/"
74
documentation = "https://workers.wasmlabs.dev/docs/intro"
8-
repository = "https://github.com/vmware-labs/wasm-workers-server/"
5+
version = { workspace = true }
6+
edition = { workspace = true }
7+
authors = { workspace = true }
8+
license = { workspace = true }
9+
repository = { workspace = true }
910

1011
[lib]
1112
path = "src/lib.rs"

kits/rust/worker/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[package]
22
name = "worker"
3-
version = "1.0.1"
4-
edition = "2021"
5-
license = "Apache-2.0"
63
homepage = "https://workers.wasmlabs.dev/"
74
documentation = "https://workers.wasmlabs.dev/docs/intro"
8-
repository = "https://github.com/vmware-labs/wasm-workers-server/"
5+
version = { workspace = true }
6+
edition = { workspace = true }
7+
authors = { workspace = true }
8+
license = { workspace = true }
9+
repository = { workspace = true }
910

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

0 commit comments

Comments
 (0)