The C and JNI bindings move out of the library into a new awgtun-ffi crate.
Requested by shoes, whose report is at git show 9e6e777:INTEGRATION.md.
Changed
- The library is a plain rlib again.
awgtundeclaredcrate-type = ["staticlib", "cdylib", "rlib"], and Cargo cannot feature-gatecrate-type, so every Rust consumer built and linked a staticlib and a cdylib it never used. On Android it was worse than wasteful:cargo-ndkcopies every cdylib in the graph into the consumer's AAR, and ours arrived under a hashed filename thatSystem.loadLibrarycannot load — downstream carried a delete step and a CI guard to undo what this crate produced. - Migration. The
ffi-bindingsandjni-bindingsfeatures are gone fromawgtun; build-p awgtun-ffiinstead, with--features jni-bindingsfor the JNI exports. The C header moves toawgtun-ffi/wireguard_ffi.hwith its contents unchanged. The Android shared library is nowlibawgtun_ffi.so, soSystem.loadLibrary("awgtun")becomesSystem.loadLibrary("awgtun_ffi"). The JNI class name is unchanged. serializationis now a public module andKeyBytesa public type. The FFI crate parses keys with it from outside the library, and turning a hex or base64 key into 32 bytes is something most consumers need anyway.
Verify a download:
gh attestation verify <file>.tar.gz --repo AYastrebov/awgtun