bltavares / colmeia

Attempt to make an interop layer to connect to dat on hyperswarm in Rust
24 stars 4 forks source link

Initial FFI tests #7

Closed bltavares closed 4 years ago

bltavares commented 4 years ago

I would like to test if it is possible to ship a embedded Dat engine into a mobile app.

Talking to friends, I've learned that iOS does not ship with any exec-like API, so it would not be viable to ship a binary there.

After taking a look on Dart FFI, I'm considering testing it directly with FFI. The effort to build a Flutter + binary application seems to be on the same league as pushing a Flutter + ffi sample.

This test intends to do the following:

Left as another PR in the future:

The steps of evolving this sample would be, IMO:

bltavares commented 4 years ago

Flutter Docs Rust FFI More Rust FFI resources

bltavares commented 4 years ago
 Note: The dart:ffi library is in beta, and breaking API changes might still happen.

Using the feature requires a Flutter 1.10.x dev channel build. To switch to the dev channel and upload the latest dev version, do the following
bltavares commented 4 years ago

I got it compiled with FFI linking after being able to setup my android env.

I'm getting signal aborted on Rust:

2020-02-09 23:14:46.531 12329-12370/com.example.colmeia_native_example D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 0
2020-02-09 23:15:08.030 12329-12400/com.example.colmeia_native_example A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 12400 (async-std/execu), pid 12329 (_native_example)
bltavares commented 4 years ago

This seems to be caused when the app blocks the UI thread. Investigating what could be done from Dart side instead of going to Java JNI

bltavares commented 4 years ago

The error happens when it panics.

We can request information and open sockets correctly, but it panics somewhere inside colmeia.

Logging has been added for android to debug.

Error ``` 2020-02-10 11:50:53.898 11690-11732/com.example.colmeia_native_example D/skia: Errors: 2020-02-10 11:50:53.979 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::an..: MDNS response sent: 146 bytes 2020-02-10 11:50:53.980 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::lo..: MDNS query sent 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/trust_dns_proto::rr::..: reading TXT 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::so..: MDNS message received 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/trust_dns_proto::rr::..: reading TXT 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::so..: MDNS message received 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::so..: MDNS message received 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::an..: MDNS query originated 10.0.2.16:5353 2020-02-10 11:50:53.982 11690-11767/com.example.colmeia_native_example D/colmeia_dat1: queue empty: "PopError" 2020-02-10 11:50:53.982 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::so..: MDNS message received 2020-02-10 11:50:53.983 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::an..: MDNS response sent: 146 bytes 2020-02-10 11:50:53.985 11690-11768/com.example.colmeia_native_example D/trust_dns_proto::rr::..: reading TXT 2020-02-10 11:50:53.985 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::so..: MDNS message received 2020-02-10 11:50:53.985 11690-11768/com.example.colmeia_native_example D/trust_dns_proto::rr::..: reading TXT 2020-02-10 11:50:53.985 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_mdns::so..: MDNS message received 2020-02-10 11:50:54.985 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto: Bulding nonce to start connection 2020-02-10 11:50:54.985 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: Sending information over the network 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 250, 174, 57, 30, 98, 111, 118, 161, 210, 62, 156, 71, 25, 138, 41, 21, 96, 41, 222, 84, 82, 155, 172, 99] 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt None 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 250, 174, 57, 30, 98, 111, 118, 161, 210, 62, 156, 71, 25, 138, 41, 21, 96, 41, 222, 84, 82, 155, 172, 99] 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 250, 174, 57, 30, 98, 111, 118, 161, 210, 62, 156, 71, 25, 138, 41, 21, 96, 41, 222, 84, 82, 155, 172, 99] 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: buffered to send [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 250, 174, 57, 30, 98, 111, 118, 161, 210, 62, 156, 71, 25, 138, 41, 21, 96, 41, 222, 84, 82, 155, 172, 99] 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto: Sent a nonce, upgrading write socket 2020-02-10 11:50:54.986 11690-11769/com.example.colmeia_native_example D/colmeia_dat1_proto: Preparing to read feed nonce 2020-02-10 11:50:54.986 11690-11766/com.example.colmeia_native_example D/colmeia_dat1: Received connection from V4(10.0.2.16:38338) 2020-02-10 11:50:54.986 11690-11766/com.example.colmeia_native_example D/colmeia_dat1: Received connection from V4(10.0.2.16:38340) 2020-02-10 11:50:55.988 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto: Bulding nonce to start connection 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: Sending information over the network 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 45, 188, 179, 17, 184, 123, 56, 132, 18, 132, 115, 58, 70, 108, 111, 170, 12, 46, 79, 235, 73, 207, 15, 251] 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt None 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 45, 188, 179, 17, 184, 123, 56, 132, 18, 132, 115, 58, 70, 108, 111, 170, 12, 46, 79, 235, 73, 207, 15, 251] 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 45, 188, 179, 17, 184, 123, 56, 132, 18, 132, 115, 58, 70, 108, 111, 170, 12, 46, 79, 235, 73, 207, 15, 251] 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: buffered to send [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 45, 188, 179, 17, 184, 123, 56, 132, 18, 132, 115, 58, 70, 108, 111, 170, 12, 46, 79, 235, 73, 207, 15, 251] 2020-02-10 11:50:55.989 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto: Sent a nonce, upgrading write socket 2020-02-10 11:50:55.990 11690-11768/com.example.colmeia_native_example D/colmeia_dat1_proto: Preparing to read feed nonce 2020-02-10 11:50:56.993 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Bulding nonce to start connection 2020-02-10 11:50:56.994 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: Sending information over the network 2020-02-10 11:50:56.994 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 107, 212, 151, 5, 71, 232, 25, 155, 239, 228, 194, 156, 119, 98, 99, 91, 20, 6, 155, 236, 115, 133, 249, 139] 2020-02-10 11:50:56.994 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt None 2020-02-10 11:50:56.994 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 107, 212, 151, 5, 71, 232, 25, 155, 239, 228, 194, 156, 119, 98, 99, 91, 20, 6, 155, 236, 115, 133, 249, 139] 2020-02-10 11:50:56.994 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 107, 212, 151, 5, 71, 232, 25, 155, 239, 228, 194, 156, 119, 98, 99, 91, 20, 6, 155, 236, 115, 133, 249, 139] 2020-02-10 11:50:56.994 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: buffered to send [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 107, 212, 151, 5, 71, 232, 25, 155, 239, 228, 194, 156, 119, 98, 99, 91, 20, 6, 155, 236, 115, 133, 249, 139] 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Sent a nonce, upgrading write socket 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Preparing to read feed nonce 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to read 1 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: original content [61] 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted content [61] 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to read 61 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: original content [0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 250, 174, 57, 30, 98, 111, 118, 161, 210, 62, 156, 71, 25, 138, 41, 21, 96, 41, 222, 84, 82, 155, 172, 99] 2020-02-10 11:50:56.995 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted content [0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 250, 174, 57, 30, 98, 111, 118, 161, 210, 62, 156, 71, 25, 138, 41, 21, 96, 41, 222, 84, 82, 155, 172, 99] 2020-02-10 11:50:56.996 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Dat feed received discoveryKey: "\374\020\331U$\"\373E\226r\332:>\275\311\362\030b\310\207!\231`\212\315\240\235\307u\340\264." nonce: "\372\2569\036bov\241\322>\234G\031\212)\025`)\336TR\233\254c" 2020-02-10 11:50:56.996 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Feed received, upgrading read socket 2020-02-10 11:50:56.997 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Handshake finished 2020-02-10 11:50:56.997 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Bulding nonce to start connection 2020-02-10 11:50:56.997 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: Sending information over the network 2020-02-10 11:50:56.997 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 28, 98, 7, 211, 128, 176, 200, 17, 156, 238, 203, 20, 165, 126, 251, 238, 217, 128, 162, 122, 224, 86, 4, 188] 2020-02-10 11:50:56.997 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt None 2020-02-10 11:50:56.997 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 28, 98, 7, 211, 128, 176, 200, 17, 156, 238, 203, 20, 165, 126, 251, 238, 217, 128, 162, 122, 224, 86, 4, 188] 2020-02-10 11:50:56.998 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 28, 98, 7, 211, 128, 176, 200, 17, 156, 238, 203, 20, 165, 126, 251, 238, 217, 128, 162, 122, 224, 86, 4, 188] 2020-02-10 11:50:56.998 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: buffered to send [61, 0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 28, 98, 7, 211, 128, 176, 200, 17, 156, 238, 203, 20, 165, 126, 251, 238, 217, 128, 162, 122, 224, 86, 4, 188] 2020-02-10 11:50:57.000 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Sent a nonce, upgrading write socket 2020-02-10 11:50:57.000 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Preparing to read feed nonce 2020-02-10 11:50:57.000 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to read 1 2020-02-10 11:50:57.000 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: original content [61] 2020-02-10 11:50:57.000 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted content [61] 2020-02-10 11:50:57.001 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to read 61 2020-02-10 11:50:57.001 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: original content [0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 45, 188, 179, 17, 184, 123, 56, 132, 18, 132, 115, 58, 70, 108, 111, 170, 12, 46, 79, 235, 73, 207, 15, 251] 2020-02-10 11:50:57.001 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted content [0, 10, 32, 252, 16, 217, 85, 36, 34, 251, 69, 150, 114, 218, 58, 62, 189, 201, 242, 24, 98, 200, 135, 33, 153, 96, 138, 205, 160, 157, 199, 117, 224, 180, 46, 18, 24, 45, 188, 179, 17, 184, 123, 56, 132, 18, 132, 115, 58, 70, 108, 111, 170, 12, 46, 79, 235, 73, 207, 15, 251] 2020-02-10 11:50:57.002 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Dat feed received discoveryKey: "\374\020\331U$\"\373E\226r\332:>\275\311\362\030b\310\207!\231`\212\315\240\235\307u\340\264." nonce: "-\274\263\021\270{8\204\022\204s:Flo\252\014.O\353I\317\017\373" 2020-02-10 11:50:57.002 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Feed received, upgrading read socket 2020-02-10 11:50:57.002 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Handshake finished 2020-02-10 11:50:57.003 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Starting 2020-02-10 11:50:57.003 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Result: Some(()) 2020-02-10 11:50:57.003 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Feed received 0 discoveryKey: "\374\020\331U$\"\373E\226r\332:>\275\311\362\030b\310\207!\231`\212\315\240\235\307u\340\264." nonce: "\372\2569\036bov\241\322>\234G\031\212)\025`)\336TR\233\254c" 2020-02-10 11:50:57.003 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Preparing to send encrypted handshake 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto: Dat handshake to send id: "\272?\354\016\243\355$@\027\014Dq\027\242\207b\244\224\330?\325\307\251,\361\t\025\366\313\375\006\315" live: true ack: false 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: Sending information over the network 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [39, 1, 10, 32, 186, 63, 236, 14, 163, 237, 36, 64, 23, 12, 68, 113, 23, 162, 135, 98, 164, 148, 216, 63, 213, 199, 169, 44, 241, 9, 21, 246, 203, 253, 6, 205, 16, 1, 40, 0] 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt None 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: content to encrypt [39, 1, 10, 32, 186, 63, 236, 14, 163, 237, 36, 64, 23, 12, 68, 113, 23, 162, 135, 98, 164, 148, 216, 63, 213, 199, 169, 44, 241, 9, 21, 246, 203, 253, 6, 205, 16, 1, 40, 0] 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: maybe encrypted [38, 160, 19, 124, 248, 91, 236, 82, 246, 87, 254, 190, 212, 214, 125, 113, 173, 112, 191, 45, 240, 15, 163, 78, 30, 203, 199, 66, 141, 102, 254, 191, 249, 0, 138, 215, 142, 33, 245, 98] 2020-02-10 11:50:57.004 11690-11767/com.example.colmeia_native_example D/colmeia_dat1_proto::s..: buffered to send [38, 160, 19, 124, 248, 91, 236, 82, 246, 87, 254, 190, 212, 214, 125, 113, 173, 112, 191, 45, 240, 15, 163, 78, 30, 203, 199, 66, 141, 102, 254, 191, 249, 0, 138, 215, 142, 33, 245, 98] 2020-02-10 11:50:57.009 11690-11767/com.example.colmeia_native_example A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11767 (async-std/execu), pid 11690 (_native_example) ```
bltavares commented 4 years ago

Panic through FFI is undefined, and should not happen. We must have a catch_unwind to avoid panics.

bltavares commented 4 years ago

iOS is working, now it needs to fix the socket panicking when running (socket closes, tries to write, when it tries to write to itself).

For posterity:

or 64-bit and iPhone OS applications, there is a linker bug that prevents -ObjC from loading objects files from static libraries that contain only categories and no classes. The workaround is to use the -all_load or -force_load flags.

 -all_load forces the linker to load all object files from every archive it sees, even those without Objective-C code. -force_load is available in Xcode 3.2 and later. It allows finer grain control of archive loading. Each -force_load option must be followed by a path to an archive, and every object file in that archive will be loaded.

It should happen on the desktop as well.

bltavares commented 4 years ago

Tracking issue to make it easier to package pre-built binaries on Flutter: https://github.com/flutter/flutter/issues/33227

bltavares commented 4 years ago

Prooved 1 2 to be viable, continue;

bltavares commented 4 years ago

Flutter Desktop plugin is only stable for Mac apps. Windows and Linux are possible, but things could change. It should be as viable as any tho