Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify build instructions in the readme #150

Closed
lrq3000 opened this issue May 19, 2024 · 3 comments
Closed

Clarify build instructions in the readme #150

lrq3000 opened this issue May 19, 2024 · 3 comments

Comments

@lrq3000
Copy link

lrq3000 commented May 19, 2024

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: rust-lang/cc-rs#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
Copy link
Owner

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
Copy link
Author

lrq3000 commented May 21, 2024

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
Copy link
Owner

alright done! Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants