Commit 1d006684 authored by trinity-1686a's avatar trinity-1686a
Browse files

fix typo and change upstream link

parent 285b3126
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -111,22 +111,22 @@ It's also implementing most of the tips below.


### Platform support
One of Arti dependancy does not compile on 32bit Android (x86 and arm). While not idea, it's possible to patch this dependancy to make it work,
One of Arti dependancies does not compile on 32bit Android (x86 and arm). While not ideal, it's possible to patch this dependancy to make it work,
by adding the following lines in your Cargo.toml.
```toml
[patch.crates-io]
fslock = { path = "https://gitlab.torproject.org/trinity-1686a/fslock", rev="9150650d9619f933bea4f34259002ab6628d2570" }
fslock = { path = "https://github.com/trinity-1686a/fslock/", rev="a0bd139a0392368ad0f05242f640c6ca7554c27f" }
```

By default, Arti run only on Android 7.0 and above. Versions under Android 7.0 will get a runtime exception due to a missing symbol.
If you want to support Android 5.0 and above, it is possible to implement lockf yourself, as it is a rather simple libc function.
It might be possible to support even lower Android version by implementing more of these methods. This has not been explored, as it
seems to be harder, and with less gain.
An implementation of lockf is part of the sample project linked above, its a Rust translation of Musl implementation for this function.
It might be possible to support even lower Android version by implementing more of these methods (at least create\_epoll1). This has
not been explored, as it seems to be harder, and with less possible gain.
An implementation of lockf is part of the sample project linked above, its a Rust translation of Musl implementation of this function.

### Debugging and stability
Arti log events to help debugging. By default these logs are not available on Android.
You can make so Arti logs are exported to logcat by adding some dependancies and writing a bit of code
You can make so Arti logs are exported to logcat by adding a couple dependancies and writing a bit of code

```toml
# in [dependancies] in Cargo.toml
@@ -141,7 +141,6 @@ use tracing_subscriber::prelude::*;
Subscriber::new()
  .with(tracing_android::layer("rust.ndk.arti")?)
  .init(); // this must be called only once, otherwise your app will probably crash

```

You should take great care about your rust code not unwinding into Java Runtime. It will crash your app with no error message to help you.