README.md (2358B)
1 # Damus Notedeck 2 3 [](https://github.com/damus-io/notedeck/actions/workflows/rust.yml) 4 5 A multiplatform nostr client. Works on android and desktop 6 7 The desktop client is called notedeck: 8 9  10 11 ## Android 12 13 Look it actually runs on android! 14 15 <img src="https://cdn.jb55.com/s/bebeeadf7001fae1.png" height="500px" /> 16 17 ## Usage 18 19 ```bash 20 $ ./target/release/notedeck 21 ``` 22 23 # Developer Setup 24 25 ## Desktop (Linux/MacOS, Windows?) 26 27 If you're running debian-based machine like Ubuntu or ElementaryOS, all you need is to install [rustup] and run `sudo apt install build-essential`. 28 29 ```bash 30 $ cargo run --release 31 ``` 32 33 ## Android 34 35 The dev shell should also have all of the android-sdk dependencies needed for development, but you still need the `aarch64-linux-android` rustup target installed: 36 37 ``` 38 $ rustup target add aarch64-linux-android 39 ``` 40 41 To run on a real device, just type: 42 43 ```bash 44 $ cargo apk run --release -p notedeck_chrome 45 ``` 46 47 ## Android Emulator 48 49 - Install [Android Studio](https://developer.android.com/studio) 50 - Open 'Device Manager' in Android Studio 51 - Add a new device with API level `34` and ABI `arm64-v8a` (even though the app uses 30, the 30 emulator can't find the vulkan adapter, but 34 works fine) 52 - Start up the emulator 53 54 while the emulator is running, run: 55 56 ```bash 57 cargo apk run --release -p notedeck_chrome 58 ``` 59 60 The app should appear on the emulator 61 62 [direnv]: https://direnv.net/ 63 64 ## Android Config 65 66 You can load custom views onto an android device for testing: 67 68 1. Copy `example-android-config.json` to `android-config.json` 69 70 2. Run `make push-android-config` to copy it to your device 71 72 ## Previews 73 74 You can preview individual widgets and views by running the preview script: 75 76 ```bash 77 ./preview RelayView 78 ./preview ProfilePreview 79 # ... etc 80 ``` 81 82 When adding new previews you need to implement the Preview trait for your 83 view/widget and then add it to the `src/ui_preview/main.rs` bin: 84 85 ```rust 86 previews!(runner, name, 87 RelayView, 88 AccountLoginView, 89 ProfilePreview, 90 ); 91 ``` 92 93 94 ## Contributing 95 96 Configure the developer environment: 97 98 ```bash 99 ./scripts/dev_setup.sh 100 ``` 101 102 This will add the pre-commit hook to your local repository to suggest proper formatting before commits. 103 104 [rustup]: https://rustup.rs/