Shipwri...hVessel(3)
π 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 π
ShipwrightShipwright::Manual
π AUTHORS π
sunnavy "<sunnavy@bestpractical.com>" π
β LICENCE AND COPYRIGHT β
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
- fedora 43: perl-Shipwright 2.4.42-24.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms