@@ -116,8 +116,6 @@ as their bit-width equivalents. This is potentially dangerous because values lar
116116* signed* type in Java, e.g. ` 200 ` stored in an ` UInt8 ` in Swift, would be interpreted as a ` byte ` of value ` -56 ` ,
117117because Java's ` byte ` type is _ signed_ .
118118
119- #### Unsigned numbers mode: annotate (default)
120-
121119Because in many situations the data represented by such numbers is merely passed along, and not interpreted by Java,
122120this may be safe to pass along. However, interpreting unsigned values incorrectly like this can lead to subtle mistakes
123121on the Java side.
@@ -135,35 +133,6 @@ on the Java side.
135133| ` Float ` | ` float ` |
136134| ` Double ` | ` double ` |
137135
138- #### Unsigned numbers mode: wrapGuava
139-
140- You can configure ` jextract ` (in FFM mode) to instead import unsigned values as their unsigned type-safe representations
141- as offered by the Guava library: ` UnsignedLong ` or ` UnsignedInt ` . To enable this mode pass the ` --unsigned-numbers-mode wrapGuava `
142- command line option, or set the corresponding configuration value in ` swift-java.config ` (TODO).
143-
144- This approach is type-safe, however it incurs a performance penalty for allocating a wrapper class for every
145- unsigned integer parameter passed to and from native Swift functions.
146-
147- SwiftJava _ does not_ vendor or provide the Guava library as a dependency, and when using this mode
148- you are expected to add a Guava dependency to your Java project.
149-
150- > You can read more about the unsigned integers support
151-
152- | Swift type | Java type |
153- | ------------| --------------------------------------------------------|
154- | ` Int8 ` | ` byte ` |
155- | ` UInt8 ` | ` com.google.common.primitives.UnsignedInteger ` (class) |
156- | ` Int16 ` | ` short ` |
157- | ` UInt16 ` | ` char ` |
158- | ` Int32 ` | ` int ` |
159- | ` UInt32 ` | ` com.google.common.primitives.UnsignedInteger ` (class)️ |
160- | ` Int64 ` | ` long ` |
161- | ` UInt64 ` | ` com.google.common.primitives.UnsignedLong ` (class) |
162- | ` Float ` | ` float ` |
163- | ` Double ` | ` double ` |
164-
165- > Note: The ` wrapGuava ` mode is currently only available in FFM mode of jextract.
166-
167136### Enums
168137
169138> Note: Enums are currently only supported in JNI mode.
0 commit comments