soupslurpr / BeauTyXT

A beautiful, private, secure, and minimalistic Text, Markdown, and Typst editor.
https://beautyxt.app
ISC License
103 stars 7 forks source link

Clarify build instructions in the readme #150

Closed lrq3000 closed 5 months ago

lrq3000 commented 6 months ago

There are missing build instructions, we need to build libraries first:

cd beautyxt_rs_typst
cargo build --lib --release --target aarch64-linux-android
copy .\target\aarch64-linux-android\release\libbeautyxt_rs_typst.so ..\app\src\main\jniLibs\arm64-v8a\libbeautyxt_rs_typst.so

cd beautyxt_rs_plain_text_and_markdown
cargo build --lib --release --target aarch64-linux-android
copy .\target\aarch64-linux-android\release\libbeautyxt_rs_plain_text_and_markdown.so ..\app\src\main\jniLibs\arm64-v8a\libbeautyxt_rs_plain_text_and_markdown.so

There are also two more necessary libraries that I don't know how to make: libdatastore_shared_counter.so and libjnidispatch.so

But anyway these libraries cannot be built on Windows because need clang to cross-compile and there are big issues to do that in Rust: https://github.com/rust-lang/cc-rs/issues/308

I found instructions to try to workaround this issue but they were too complicated and uncertain for the time I had to work on this.

So I just extracted the libs folder from the latest BeautyXT .apk and moved it to the expected path (app/src/main/ and renamed to jniLibs).

soupslurpr commented 6 months ago

Oh there are some build instructions for the Rust libraries in "useful-commands.txt" in the Rust library root folder. CONTRIBUTING.md talks about them. I'm on Windows 11 so it should hopefully work fine for you as well.

lrq3000 commented 6 months ago

Oh ok sorry I missed that, usually CONTRIBUTING.md is more about how to open new issues and PRs. I'd suggest to clarify that in the readme (just mentioning that CONTRIBUTING also points to build instructions).

soupslurpr commented 5 months ago

alright done! Thanks for the suggestion.