From: Maxime Devos <maximedevos@telenet.be>
To: mcsinyx@disroot.org, "Mája Tomášek" <maya.tomasek@disroot.org>,
guix-devel@gnu.org
Subject: Re: Strategy for Zig packages
Date: Fri, 5 Aug 2022 01:56:15 +0200 [thread overview]
Message-ID: <f03bef01-f8d6-764c-ded7-4f0b7c3c40d4@telenet.be> (raw)
In-Reply-To: <CLW2UXOX7XY2.1J8R0OJ0KMXNB@nix>
[-- Attachment #1.1.1: Type: text/plain, Size: 1868 bytes --]
> FWIW I was commenting on the impossibility
> of dynamically linking Zig libraries that uses comptime.
It doesn't make a difference, AFAICT my explanation on why it can work
holds equally for static as for shared libraries.
On 03-08-2022 05:35, mcsinyx@disroot.org wrote:
> Compile-time execution must be done at, well, compilation time,
> thus macros in shared objects are just glorified embedded
> source code that are not used at runtime.
My point was that macros and dynamic (or static) linking is compatible
with generics and macros. Of course, if your Zig code consists purely of
generics and macros, it's kind of pointless, but presumably there's
non-generic code too and non-generic library code that chooses a
particular instance of a generic (monomorphisation?) that could benefit
from compiling only once instead of being recompiled for every leaf (+-
application).
> That being said, there may be a Zig ABI in the future, with the cost
> of missing certain features (like comptime) and optimizations:
> https://github.com/ziglang/zig/issues/3786
A fixed, stable, ABI or documented ABI is not required for Guix because
we have the store and RPATH (or RUNPATH, I always forget which one we
use) and the store model instead of putting things in /usr/lib and
searching for them there, so occasional ABI breaks are not a problem for
Guix.
Distros like, say, Debian, are another matter of course, though they
could resort to build-from-scratch like done with Rust currently.
You are referring to optimisations, but at least LTO is perfectly
combinable with static libraries (see, e.g., Rust). Shared libraries
should be equally possible if it is accepted that it won't be always
possible anymore to simply replace the shared library with another
(because of things like inlining).
Greetings,
Maxime
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2022-08-04 23:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 10:56 Strategy for Zig packages mcsinyx
2022-07-26 18:48 ` Liliana Marie Prikler
2022-07-26 19:23 ` Maxime Devos
2022-08-01 20:43 ` Mája Tomášek
2022-08-02 5:21 ` mcsinyx
2022-08-02 9:09 ` Maxime Devos
2022-08-03 3:35 ` mcsinyx
2022-08-04 23:56 ` Maxime Devos [this message]
2022-08-02 9:11 ` Maxime Devos
2022-08-02 9:01 ` Maxime Devos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f03bef01-f8d6-764c-ded7-4f0b7c3c40d4@telenet.be \
--to=maximedevos@telenet.be \
--cc=guix-devel@gnu.org \
--cc=maya.tomasek@disroot.org \
--cc=mcsinyx@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.