From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zhu Zihao Newsgroups: gmane.emacs.devel Subject: Dedicated search path variable for architecture-dependant loadable file Date: Fri, 15 Jan 2021 19:00:43 +0800 Message-ID: <86h7niwjl0.fsf@163.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36032"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.14; emacs 27.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 15 12:02:33 2021 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 1l0MsD-0009Ig-Oe for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Jan 2021 12:02:33 +0100 Original-Received: from localhost ([::1]:49098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0MsC-0007qt-IS for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Jan 2021 06:02:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Mr3-0007Jf-8J for emacs-devel@gnu.org; Fri, 15 Jan 2021 06:01:21 -0500 Original-Received: from m12-13.163.com ([220.181.12.13]:60001) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l0Mqv-0007r4-Qi for emacs-devel@gnu.org; Fri, 15 Jan 2021 06:01:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=JN3Mf HaGE44ca1b4IfELxAH4xFbsTVkXlolDUT/S2qU=; b=A5tad0L5uTFpMA1vIlMdO SpjD4bL7v0qyNT84ist6rvsLM7j4XCXfbrHWGx2+HXAo+W3ZfKNiRsMWc7tTU0O8 Ouroscex2ZO9toB2gb7uKOB17yiK1LUbx/g9YuMtzq3ZwxmpUFRnwcJ8ZWRdw6EZ yhb14s2SeAdJ4Dq0pQaYJs= Original-Received: from asus-laptop (unknown [113.100.122.187]) by smtp9 (Coremail) with SMTP id DcCowADn9zvedQFgK78CbA--.31180S2; Fri, 15 Jan 2021 19:00:48 +0800 (CST) X-CM-TRANSID: DcCowADn9zvedQFgK78CbA--.31180S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr1xuF4DCw17Xr45KFy3Arb_yoWDAFXEkr Z5JrZ5J3ykXayIga1ayF1ftFZ7Ww48Wa4rA3y0vr42vry8X3Z3ArZ3Ary8ZrZxJ3WjgFyq 93W5Jw47A3WrujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU8bo7tUUUUU== X-Originating-IP: [113.100.122.187] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbCCgEbr12MZm-fJgABsf Received-SPF: pass client-ip=220.181.12.13; envelope-from=all_but_last@163.com; helo=m12-13.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:263071 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Emacs hackers! Recently I'm working with a Emacs project that contains a dynamic module written in Rust. In order to use "require" to load the dynamic module in Lisp file. I have to ensure the compiled library in the "load-path" variable. Usually it was placed under the same directory of other Lisp files. It's OK for me. But it's not an idiomatic way in distribution packaging. For distrbution packaged Elisp packages, Lisp files usually placed at /share/emacs/site-lisp. In FHS spec (https://www.pathname.com/fhs/pub/fhs-2.3.html), /share should only contains architecture-independant files, and obviously dynamic library is not the case. They should be placed under /lib. My suggestion is add a new `native-load-path` Lisp variable and `EMACSNATIVELOADPATH` environment variable to enable a dedicated search path for native files. Looking for your comments :) =2D-=20 Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYAF12xUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQvkKzUqn2gh+9zAD8D1qi3HBhMcEnC9YzItyzl/l0EpfW XwMn4hJ1YQgSr34BAO3pO7pxjDnvGHutISQerIwbOlrU4MCHhELNMUbGhzoP =OnW1 -----END PGP SIGNATURE----- --=-=-=--