@@ -37,9 +37,50 @@ code reviews, and input on current topics of discussion.
37
37
Since we must sometimes reject new features in order to limit the project's
38
38
scope, you may wish to ask first before writing a new feature.
39
39
40
- ### Stability
41
-
42
- TODO
40
+ ### Stability and Portability
41
+
42
+ We try to follow [ semver rules] ( https://docs.npmjs.com/misc/semver ) regarding
43
+ API-breaking changes and ` MAJOR.MINOR.PATCH ` versions:
44
+
45
+ - New * patch* versions should not include API-breaking changes or major new
46
+ features
47
+ - Before 1.0, * minor* versions may include API breaking changes. After 1.0
48
+ they should not.
49
+ - We may make pre-releases like ` 0.5.0-pre.0 ` . In this case:
50
+
51
+ - although these are public versions, they are not used by default unless
52
+ opting into using a pre-release on the specific ` MAJOR.MINOR.PATCH `
53
+ version
54
+ - pre-releases are considered semantically less than their stem (e.g.
55
+ Cargo may automatically upgrade from ` 0.5.0-pre.0 ` to ` 0.5.0 ` )
56
+ - all pre-release versions are unstable and may make any change
57
+ - we make no commitment to support users of pre-releases
58
+
59
+ Additionally, we must also consider * value-breaking changes* and * portability* .
60
+ A function is * value-stable* if, given the same inputs:
61
+
62
+ - it is portable (produces the same results on all platforms)
63
+ - changing the output value for some input in a new library version is
64
+ considered a breaking change
65
+
66
+ Note that some Rand functionality is supposed to be value stable, and some
67
+ functionality is supposed to be non-deterministic (i.e. depend on something
68
+ external). Some functionality may be deterministic but not value-stable.
69
+
70
+ A trait should define which of its functions are expected to be value-stable.
71
+ A type (e.g. a PRNG) is value-stable if all implementations of trait functions
72
+ for that type are value-stable where expected to be.
73
+
74
+ Before 1.0, we allow any new * minor* version to break value-stability, though
75
+ we do expect such changes to be mentioned in the changelog. Post 1.0 we have
76
+ not yet determined exact stability rules.
77
+
78
+ Additionally, we expect patch versions not to change the output of any
79
+ deterministic functions, even if not value-stable (this is not a hard
80
+ requirement, but exceptions should be noted in the changelog).
81
+
82
+ Defining which parts of Rand are value-stable is still in progress. Many parts
83
+ of ` rand_core ` have some documentation on value-stability.
43
84
44
85
### Project Scope
45
86
0 commit comments