Skip to content

Commit 32c505f

Browse files
committed
Update doc comment
1 parent dde7694 commit 32c505f

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

packages/vm-derive/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ macro_rules! maybe {
1111
use maybe;
1212

1313
/// Hash the function
14-
///
14+
///
1515
/// # Example
16-
///
16+
///
1717
/// ```rust
1818
/// # use vm_derive::hash_function;
1919
/// #[hash_function(const_name = "HASH")]

packages/vm/src/modules/file_system_cache.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,22 @@ fn raw_module_version_discriminator() -> String {
8787
hasher.finalize().to_hex().to_string()
8888
}
8989

90-
/// Bump this version whenever the module system changes in a way
90+
/// This version __MUST__ change whenever the module system changes in a way
9191
/// that old stored modules would be corrupt when loaded in the new system.
9292
/// This needs to be done e.g. when switching between the jit/native engine.
9393
///
94+
/// By default, this derived by performing the following operation:
95+
///
96+
/// ```ignore
97+
/// BLAKE3(
98+
/// manual module version,
99+
/// wasmer version requirement,
100+
/// BLAKE3(cost_fn)
101+
/// )
102+
/// ```
103+
///
104+
/// If anything else changes, you must change the manual module version.
105+
///
94106
/// The string is used as a folder and should be named in a way that is
95107
/// easy to interpret for system admins. It should allow easy clearing
96108
/// of old versions.

0 commit comments

Comments
 (0)