Skip to content

Commit a0bee91

Browse files
committed
add some comments about safety
1 parent 535b332 commit a0bee91

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

content/docs/get-started/2.values.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ when failures occur. Eliminating these modes of failure in omics development and
1212
analyses is one of the primary reasons the project was created.
1313

1414
To that end, correctness should be considered the highest priority of crates in the
15-
`rust-seq` stack—**even at the cost of performance**.
15+
`rust-seq` stack—**even at the cost of performance**.
16+
17+
In situations where performance is critical, developers should provide both a _safe_
18+
and _unsafe_ interface, clearly documenting the pre-requisites for the _unsafe_ interface
19+
at the API level. Likewise, any `unsafe` code should be explicity documented (in the code)
20+
with a comment beginning with the token `SAFETY:`, that explicitly describes why the code
21+
in the unsafe block is expected to operate correctly and not invoke undefined behavior.
1622

1723
## Performant
1824

0 commit comments

Comments
 (0)