Shipwri...hVessel(3)

πŸ“¦
version 2.4.42 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Shipwright::Manual::BuildMultiArchVessel β€” bestie, this is how you build a vessel with multi-arch support ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so in this tutorial we're building a vessel with multi-arch support β€” a.k.a. the vessel that I can use on multiple systems, like Mac and Ubuntu. One vessel, many systems, main character energy fr fr πŸ’…


🌸 DESCRIPTION 🌸

Shipwright started having multi-arch vessel support in 2.3.0, and ever since then, all installed bin dirs and lib will live in as/$arch_name, instead of the top dir. Slay πŸ’–

πŸŽ€ create

The vessel source is exactly the same as a normal one, no cap. The only different part is the way we build the vessel with bin/shipwright-builder. And we need to build the vessel on both Mac and Ubuntu. Both. Not one. Both. 😀

Let's do this on Mac first:

$ ./bin/shipwright-builder --install-base /tmp/foo --as Mac

If we don't specify --as, the default name is the system's uname. e.g. the name is Darwin on Mac. iykyk 🧚

After we built it on Mac, we need to transfer both shipyard and vessel to ubuntu, then build it again, to let it build to the same vessel dir:

$ ./bin/shipwright-builder --install-base /tmp/foo --as Ubuntu

Ditto. If we don't specify --as, the as name will be Linux.

Then we're done πŸŽ‰ the built vessel can run on both Mac and Ubuntu systems now. It's giving portable. It's giving iconic. πŸ‘‘

✨ fiddle

Most CPAN modules are written in Perl, so it's cross-platform β€” but the way that results in not less redundance in the vessel, bestie 😭 so we can use shipwright-filter to squeeze it:

$ ./bin/shipwright-filter --squeeze

This will remove redundant files and link to the left files. Obsessed.

e.g. as/Mac/lib/perl5/App/SD.pm and as/Ubuntu/lib/perl5/App/SD.pm have the same content β€” after the above cmd, the latter one will be deleted and (hard) linked to the former one. Dedupe queen πŸ’…βœ¨

🫢 use

The multi-arch vessel can't auto-switch between the systems for us πŸ™ˆ so we need to run a cmd to tell it to, e.g.

$ cd /tmp/foo
# on Mac, we switch to Mac
$ ./tools/shipwright-utility --switch Mac
# on Ubuntu, we switch to Ubuntu
$ ./tools/shipwright-utility --switch Ubuntu

Manual switching only, no magic, periodt. πŸ’–


🌈 SEE ALSO 🌈

  • Shipwright
  • Shipwright::Manual

πŸ‘‘ AUTHORS πŸ‘‘

sunnavy "<sunnavy@bestpractical.com>" πŸ’Œ


Shipwright is Copyright 2007-2015 Best Practical Solutions, LLC.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


Okay that's the whole page bestie, and if you ever need to check the version vibes: this is from perl v5.42.0, dated 2025-07-25. Go build that multi-arch vessel, you got this πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from