-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
synocli-file: add ripgrep, initial rust support #3883
Conversation
@Hylen thanks for this great contribution!
TODO moved to PR descritpion I could push my suggestions, but prefer to investigate into the framework part first. |
Another TODO (done in separate PR #3884)
@ymartin59 |
Hi @hgy59 , I should be thanking for this great framework!
Do you want me to start clearing the TODO, or are you working on it? I could start working on downloading the official release etc. if you want me to do the framework stuff.
What is this? I saw a comment about it when opening the pull request but couldn't find anything here: |
@Hylen With validation I mean that we have to validate, that the code created by rust for a specific Inspired by your PR I am currently working on a generic ARM7 arch for modules built with go. I hope we will have the same benefit for targets built with rust, but rust depends on the toolchain specific compiler. But I am hopeful that we will get there. The first todo is a very challenging task, so it will take some time. For now I pushed my suggestions (ignore the |
As other grep tools I moved ripgrep to the This PR is now ready to merge and publish updated ARMv7 packages of ripgrep will be available with |
Initial packages for validation are available here: ripgrep_v11.0.2_pre Please report working/non working results here. @AdithyaBenny (as you originally requested ripgrep) what kind of arch is your diskstation? can you test it? |
@hgy59 Where is your work in progress for this? I see you checked off everything but the validation above, and I'm afraid I can't help with that except armada38x. So I guess I'll just wait for others to validate the packages? In the meantime I'm interested in trying to get BitWarden (#3712) to** work too, so I would like to work on your latest patch. |
Ah, I see you pushed it to my fork. Thanks! |
Looked through your patches, looks great! Thanks for improving this. What is diyspk? Stuff not published to the repository? |
yes diyspk is "do it yourself spk" for packages contained in synocli-, while only the synocli- are published. |
I tried bitwarden too, based on the rust infrastructure developed for this PR.
It looks like a problem with sqlite, but I couldn't find any useful information in the net. And the rust build of bitwarden_rs took a very long time (felt like 2 hours, but may have been less) |
I started doing exactly what you described, installing nightly etc. Feels like a waste if we're both working on it, but I'm happy to take a look if you want. Perhaps you can push your work in progress somewhere? There's also the option of using either postgress (saw you had some work in progress for a package) or mariadb for the database. I'm using mariadb for other stuff, so I was going to try that but I think we'll be able to get all of them working if we want. |
The rust makefile is worth to push here. |
Ok, I merged our efforts and pushed it on the branch "bitwarden" in my fork. My build doesn't work for obvious reasons yet (I don't build all dependencies etc.) but we're a bit on the way I'd say. In the coming days I might find time to finalize. (I didn't look at your makefile yet, still using my own) |
I managed to cross compile bitwarden too btw. Pushed the progress to my fork. |
@Hylen thanks for bitwarden progress. The cross/bitwarden_rs builds succeed, but the cross compiling in spk/bitwarden_rs builds fails (all archs except x64) with |
That is really weird! I will take a look when I have some time over. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job.
Some minor improvements requests.
Are you sure all targets in mk/spksrc.cross-rust.mk are required?
@hgy59 I took a look at this and it's related to the environment variable CC. Looks like CC gets set to the cross compiler, but rustup expects it to be the host compiler. I think this is what's causing it Pushed the progress to the bitwarden branch in my fork. |
@ymartin59 I gave it a quick look again now, and I can't find anything redundant by just inspecting the code. I don't completely understand the whole makefile system though, so I might be missing something. Perhaps @hgy59 knows this better? |
@ymartin59 the mk/spksrc.cross-rust.mk is based on mk/spksrc.cross-cc.mk and adjusted for rust. |
@hgy59 May you please rebase to take benefits of new Makefiles with "common" targets, so that to include them (instead of copy-paste)? Thank you in advance |
I squashed, rebased, and fixed issues here: https://github.com/etcusrvar/spksrc/tree/hylen-rg-merge. With this, I was able to build and run rg on my syno device. |
@hgy59 @Hylen @etcusrvar I've rebased the PR https://github.com/publicarray/spksrc/commits/ripgrep if you like I can force push it onto here. |
This also adds support for building rust packages.
- install cargo to /opt/cargo - download additional rust targets - use officially released version of ripgrep - make square icon
- add common Makefile for rust build and installation - install rust targets on demand - remove rust target installation from Dockerfile
- add ripgrep to synocli-file - move spk/ripgrep to diyspk/ripgrep
- allow to define other release channel than 'stable' - allow to define additional cargo build args
- adjust spksrc.cross-rust.mk - adjust UNSUPPORTED_ARCHS
This also adds support for building rust packages.
This solves issue #3799 (closes #3799)
I followed the Developers-HOW-TO and tested this using:
make arch-x64-6.1 arch-aarch64-6.1 arch-armada38x-6.1
I only tested installing
arch-armada38x-6.1
as that's the device I own.Tasks done:
mk/spksrc.rust.mk
top build rust projectsall-supported
targets (first rust build needs enhanced validation)Archs that are not supported (with
make all-supported
)