Stream: git-wasmtime

Topic: wasmtime / issue #9103 Option to turn off and clear autom...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 17:49):

guest271314 opened issue #9103:

Thanks for filing a feature request! Please fill out the TODOs below.

Feature

Option to turn off and clear automatic module caching to ~/.cache/wasmtime/modules/wasmtime-.

Benefit

When testing the contents of ~/.cache/wasmtime/modules/wasmtime- can continue to grow exponentially.

Implementation

Add an option to

  1. Run the .wasm file directly without caching
  2. Option to automatically remove the cached folders and files after the .wasm file is run
  3. Option to remove the contents of wasmtime cached modules, e.g., with Bun we can do bun pm cache rm

Alternatives

Unknown.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 17:54):

bjorn3 commented on issue #9103:

You can disable the cache globally by writing

[cache]
enabled = false

to ~/.config/wasmtime/config.toml.

To disable the cache for a single invocation use -C cache=n. To remove the cache you can remove the ~/.cache/wasmtime directory.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 18:00):

guest271314 commented on issue #9103:

@bjorn3 That works. I had to create the ~/.config/wasmtime directory and config.toml file. Is this documented somewhere here?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 18:05):

guest271314 closed issue #9103:

Thanks for filing a feature request! Please fill out the TODOs below.

Feature

Option to turn off and clear automatic module caching to ~/.cache/wasmtime/modules/wasmtime-.

Benefit

When testing the contents of ~/.cache/wasmtime/modules/wasmtime- can continue to grow exponentially.

Implementation

Add an option to

  1. Run the .wasm file directly without caching
  2. Option to automatically remove the cached folders and files after the .wasm file is run
  3. Option to remove the contents of wasmtime cached modules, e.g., with Bun we can do bun pm cache rm

Alternatives

Unknown.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 18:11):

bjorn3 commented on issue #9103:

The wasmtime config new command creates this file with the default configs filled in. It also prints the path to the config file it created.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 18:16):

guest271314 commented on issue #9103:

Thanks.

Would help if the content of the wasmtime "guide" was conspicuously in the README.

I still don't know what wasmtime-min does and how to use that executable.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 18:47):

bjorn3 commented on issue #9103:

I still don't know what wasmtime-min does and how to use that executable.

It is the wasmtime executable, except with every optional feature (like wasi support) disabled and optimized for size. You should ignore it unless you actually need a tiny wasmtime binary for some reason.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2024 at 18:59):

guest271314 commented on issue #9103:

You should ignore it unless you actually need a tiny wasmtime binary for some reason.

Testing.

except with every optional feature (like wasi support) disabled

I guess that explains why wasmtime-min doesn't execute code compiled with javy.


Last updated: Oct 23 2024 at 20:03 UTC