Skip to content

Commit b426ac7

Browse files
Updated README.
1 parent aed8f54 commit b426ac7

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
A cross-platform, fast, and safe general purpose C library written in Rust.
33

44
The library is organized as a series of modules. The top level module `nstd` encompasses the entire
5-
crate. Each module can have their own submodules (eg. `nstd.core.def` or `nstd::core::def` with
5+
crate. Each module can have their own submodules (eg. `nstd.io.stdout` or `nstd::io::stdout` with
66
Rust syntax).
77

88
# Example using C
@@ -64,34 +64,36 @@ int main()
6464
`nstd.core` should support anything that rustc supports.
6565

6666
`nstd.os`'s child modules will only work on the operating system they target. For example,
67-
`nstd.os.windows` will only work on Windows and `nstd.os.linux` will only work on Linux
68-
distributions.
67+
`nstd.os.windows` will only work on Windows and `nstd.os.unix` will only work on Unix-like systems.
6968

7069
Other modules will work on most platforms, primarily targeting Windows, macOS,
7170
Linux, Android, and iOS.
7271

7372
# Language support
74-
This library can be accessed from any language that supports calling C code! As of now this will
75-
need to be done manually as there are no official wrappers for the API, however whenever library
76-
versioning occurs, the plan is to start adding official wrappers so developers from other languages
73+
This library can be accessed from any language that supports calling C code. As of now this will
74+
need to be done manually as there are no official wrappers for the API, however somewhere around
75+
version 0.11, the plan is to start adding official wrappers so developers from other languages
7776
can easily use the API.
7877

79-
# Safety notes
78+
# User safety notes
8079

8180
- Raw pointers are unsafe to access.
8281

83-
- Raw pointer data is unsafe to mutate.
84-
85-
- Any function that may cause undefined behavior must be marked unsafe.
86-
87-
- Any operation that makes a direct call on a C function pointer is considered unsafe.
82+
- References are assumed to be valid (aligned, non-null, and non-dangling), and are safe to access.
83+
Users can refer to the [docs](https://docs.rs/nstd-sys/latest/nstd_sys/) to see which APIs expect
84+
or return valid references.
8885

8986
- The panic behavior is set to abort by default, as it is undefined behavior to unwind from Rust
9087
code into foreign code (though this is
9188
[subject to change](https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html)).
9289

93-
- Reference arguments are assumed to be valid (aligned, non-null, and non-dangling), and are safe
94-
to access.
90+
# Contributor safety notes
91+
92+
- Any operation that may cause undefined behavior must be marked unsafe.
93+
94+
- Any operation that may cause data races must be marked unsafe.
95+
96+
- Any operation that makes a direct call on a foreign C function pointer must be marked unsafe.
9597

9698
# How to build
9799
`nstd` lets you decide what features you want to use.

0 commit comments

Comments
 (0)