File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ macro_rules! maybe {
11
11
use maybe;
12
12
13
13
/// Hash the function
14
- ///
14
+ ///
15
15
/// # Example
16
- ///
16
+ ///
17
17
/// ```rust
18
18
/// # use vm_derive::hash_function;
19
19
/// #[hash_function(const_name = "HASH")]
Original file line number Diff line number Diff line change @@ -87,10 +87,22 @@ fn raw_module_version_discriminator() -> String {
87
87
hasher. finalize ( ) . to_hex ( ) . to_string ( )
88
88
}
89
89
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
91
91
/// that old stored modules would be corrupt when loaded in the new system.
92
92
/// This needs to be done e.g. when switching between the jit/native engine.
93
93
///
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
+ ///
94
106
/// The string is used as a folder and should be named in a way that is
95
107
/// easy to interpret for system admins. It should allow easy clearing
96
108
/// of old versions.
You can’t perform that action at this time.
0 commit comments