diff --git a/Cargo.lock b/Cargo.lock index bb06cf8f..771ceb5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "wasm-workers-rs" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "base64 0.21.0", @@ -2948,7 +2948,7 @@ dependencies = [ [[package]] name = "wasm-workers-server" -version = "1.0.1" +version = "1.1.0" dependencies = [ "actix-web", "anyhow", @@ -3487,7 +3487,7 @@ dependencies = [ [[package]] name = "worker" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "http", @@ -3500,7 +3500,7 @@ dependencies = [ [[package]] name = "wws-config" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "serde", @@ -3511,7 +3511,7 @@ dependencies = [ [[package]] name = "wws-data-kv" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "serde", @@ -3520,7 +3520,7 @@ dependencies = [ [[package]] name = "wws-router" -version = "1.0.1" +version = "1.1.0" dependencies = [ "lazy_static", "regex", @@ -3533,7 +3533,7 @@ dependencies = [ [[package]] name = "wws-runtimes" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "serde", @@ -3546,7 +3546,7 @@ dependencies = [ [[package]] name = "wws-runtimes-manager" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "reqwest", @@ -3560,7 +3560,7 @@ dependencies = [ [[package]] name = "wws-server" -version = "1.0.1" +version = "1.1.0" dependencies = [ "actix-files", "actix-web", @@ -3572,7 +3572,7 @@ dependencies = [ [[package]] name = "wws-store" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "blake3", @@ -3580,7 +3580,7 @@ dependencies = [ [[package]] name = "wws-worker" -version = "1.0.1" +version = "1.1.0" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 4476626b..b618bdd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 " ] license = "Apache-2.0" diff --git a/docs/docs/features/mount-folders.md b/docs/docs/features/mount-folders.md new file mode 100644 index 00000000..d0fde8fb --- /dev/null +++ b/docs/docs/features/mount-folders.md @@ -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. diff --git a/kits/rust/Cargo.toml b/kits/rust/Cargo.toml index 1ccd5f09..b6dae869 100644 --- a/kits/rust/Cargo.toml +++ b/kits/rust/Cargo.toml @@ -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" diff --git a/kits/rust/worker/Cargo.toml b/kits/rust/worker/Cargo.toml index 81eb85de..6248b06f 100644 --- a/kits/rust/worker/Cargo.toml +++ b/kits/rust/worker/Cargo.toml @@ -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]