From c41ace15f0629d14eee665db2ddaf0c52d525270 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Wed, 5 Apr 2023 10:28:40 -0700 Subject: [PATCH] docs: add extern safety note --- glue/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glue/README.md b/glue/README.md index c5642cf..f168dc9 100644 --- a/glue/README.md +++ b/glue/README.md @@ -12,6 +12,11 @@ should use the `dev.toad.ffi.uX` compat classes to ensure that the primitive casts in rust succeed. ### unsafe +#### externs +no extern fns called by java should be decorated `unsafe` and should instead be +safe functions with `unsafe` expression bodies to clearly denote the patterns +of unsafety within. + #### justification with 1 exception described below in [# pub static mut RUNTIME](#pub-static-mut-runtime), all uses of `unsafe` in safe functions are accompanied