From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: Re: [PROPOSAL] Builder, a build system integration for Emacs Date: Sun, 28 May 2023 15:50:25 +0530 Message-ID: References: <95980ffc-86e7-ad54-4a20-539d8c6ea5d0@mailo.com> <3f68f4bc-d426-0bcc-1329-674c12b29386@mailo.com> <76e12f7c-335f-476b-ffb3-fd8e8e4ab5d0@mailo.com> <87pm6rx4ea.fsf@yahoo.com> <87wn0ytefw.fsf@gmail.com> <83h6s0n95y.fsf@gnu.org> <83edn4myz4.fsf@gnu.org> <83a5xsmuc0.fsf@gnu.org> <831qj4mlg7.fsf@gnu.org> <3a315ddd3aa7d7cda74e@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3737"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Cancel-Lock: sha1:0jO+LAFj8YOOAxzLUshTIq5qg5I= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 28 14:35:19 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q3FcF-0000ln-Nl for ged-emacs-devel@m.gmane-mx.org; Sun, 28 May 2023 14:35:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3FbQ-00085A-7O; Sun, 28 May 2023 08:34:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3DWN-0004wy-JM for emacs-devel@gnu.org; Sun, 28 May 2023 06:21:07 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3DWL-0003yi-Vr for emacs-devel@gnu.org; Sun, 28 May 2023 06:21:07 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1q3DWI-00064U-IO for emacs-devel@gnu.org; Sun, 28 May 2023 12:21:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 28 May 2023 08:34:25 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306374 Archived-At: * Gregory Heytings <3a315ddd3aa7d7cda74e @heytings.org> : Wrote on Sat, 27 May 2023 00:25:25 +0000: >>> This is the misconception I pointed to in my previous post: Rust >>> libraries are not dynamic libraries, they are compiled into the >>> program. This eliminates all compatibility problems: you can have >>> as many programs as you want on your computer, each one compiled >>> with a different version of a given library. >> I have trouble understanding that. Before dynamic libraries, we >> used static libraries. Each library was a .o file, made by >> compilation. > Rust libraries are neither dynamic (compiled separately and loaded at > run time) nor static (compiled separately and linked at build time), > they are always compiled together with the program. >> But how can each program have its own version of one and the same >> library? Does Rust store all libraries as **source code** and >> recompile each library each time that library is linked into a >> program? >> > > Yes, that's how it works. For example, there are 25 versions of the > "itoa" library (which does the opposite of the well-known "atoi" > function), and you could have 25 different Rust programs on your > computer, each one using on a different version of that library. If > you build these programs yourself, you will end up, in your local > CARGO_HOME directory, with a copy of the source code of the 25 > versions of that library: itoa-0.1.0, ..., itoa-1.0.6. This (and in golang) is the spiritual equivalent of having (and shipping) every variant of functions in all released versions glibc available, and a program may "link" to any of the versions. Where "linking" means compiling all the sourcees, using the current llvm satisfying the hardware and build requirements including memory and hardware and obligatory traffic to the repo homeservers (no payas you cannot change crates.io, you can only add a second repo server, and change all your config files to use it) Conventional thinking would abhor at the horror of having all versions of all glibc functions all the time, even if you have got the whole thing from a repo server. Now why is this is a good idea? The folk investing in it and the jobs and also investing in the hardware and bandwidth probably know.