README.md (2151B)
1 # Damus Notedeck 2 3 [![CI](https://github.com/damus-io/notedeck/actions/workflows/rust.yml/badge.svg)](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 ![notedeck](https://cdn.jb55.com/s/6130555f03db55b2.png) 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 ## Previews 65 66 You can preview individual widgets and views by running the preview script: 67 68 ```bash 69 ./preview RelayView 70 ./preview ProfilePreview 71 # ... etc 72 ``` 73 74 When adding new previews you need to implement the Preview trait for your 75 view/widget and then add it to the `src/ui_preview/main.rs` bin: 76 77 ```rust 78 previews!(runner, name, 79 RelayView, 80 AccountLoginView, 81 ProfilePreview, 82 ); 83 ``` 84 85 86 ## Contributing 87 88 Configure the developer environment: 89 90 ```bash 91 ./scripts/dev_setup.sh 92 ``` 93 94 This will add the pre-commit hook to your local repository to suggest proper formatting before commits. 95 96 [rustup]: https://rustup.rs/