-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump wws to 1.1.0. Add mount folders docs
- Loading branch information
1 parent
e10ffed
commit a2ce3bb
Showing
5 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters