Installing a self-built crate (lib) with alr?

How do I install a crate with alr that I have built myself locally? It’s a library - anet to be more precise. I can of course copy the library somewhere but…

I’m still a bit of an alire newbie myself, but I popped into the docs at the alire website and this is what I found (below). Is this what you are looking for hopefully?

If that is related to what you are looking for, then I got it here: Alire - Docs

I think you just cd into the top level of your crate and use alr install (with whatever options make sense for you)

If not, I apologize.

1 Like

It worked - in ~./alire/lib/anet=0.1.0-dev/anet/.alire’ is libanet.so → …/anet/libanet.so.0.1.0 `! Thanks! I had also seen the command but didn’t realize that it would work.

It is there, sure. But now I need to figure out how to configure/update a local index as alr with anet doesn’t know anything about the new kid on the block. The docs ibidem are a little tight regarding this point.

Does this document help at all:

1 Like

Unfortunately my alr doesn’t recognize --for-private-index. I continue investigating.

See also: Docs: Unclear how to use local crate - this is from 2022.

It might be worth putting up a GitHub issue if --for-private-index isn’t working. Link to that doc as well

Sorry I don’t know much more. I’m new to alire as well

1 Like

Got it:


karl@rantanplan:~/src/ada/super$ alr with anet
ⓘ Synchronizing workspace...
Dependencies automatically updated as follows:

   ✗ anet 0.1.0-dev (removed)

Requested changes:          

   ✓ anet ~0.1.0-dev (add)
                            
Changes to dependency solution:

   + anet 0.1.0-dev (new)

Do you want to proceed?
[Y] Yes  [N] No  (default is Yes) yes

karl@rantanplan:~/src/ada/super$ alr index
# NAME      URL                                                           PATH                                            
1 community git+https://github.com/alire-project/alire-index#stable-1.3.0 /home/karl/.config/alire/indexes/community/repo
2 local     file:///home/karl/local-idx                                  /home/karl/local-idx                           
karl@rantanplan:~/src/ada/super$ alr index --check
✓ No issues found in index contents.

Tomorrow I’ll write a recipe…

BTW:

karl@rantanplan:~/src/ada/fubar$ apt search libanet
Sorting... Done
Full Text Search... Done
libanet0.4.3/jammy 0.4.2-4 amd64
  Ada networking library

libanet5-dev/jammy 0.4.2-4 amd64
  Ada networking library (development)

:sunglasses::crazy_face: The journey is the destination.

1 Like

This is a new feature in the master branch, no release has it yet.

Currently what you can do is use --skip-submit and you’ll end with the manifest that has to be placed in your personal index.

1 Like