unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Dedicated search path variable for architecture-dependant loadable file
@ 2021-01-15 11:00 Zhu Zihao
  2021-01-15 11:34 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Zihao @ 2021-01-15 11:00 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

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
<prefix>/share/emacs/site-lisp. In FHS spec
(https://www.pathname.com/fhs/pub/fhs-2.3.html), <prefix>/share should
only contains architecture-independant files, and obviously dynamic
library is not the case. They should be placed under <prefix>/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 :)
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Dedicated search path variable for architecture-dependant loadable file
  2021-01-15 11:00 Dedicated search path variable for architecture-dependant loadable file Zhu Zihao
@ 2021-01-15 11:34 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2021-01-15 11:34 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: emacs-devel

> From: Zhu Zihao <all_but_last@163.com>
> Date: Fri, 15 Jan 2021 19:00:43 +0800
> 
> 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
> <prefix>/share/emacs/site-lisp. In FHS spec
> (https://www.pathname.com/fhs/pub/fhs-2.3.html), <prefix>/share should
> only contains architecture-independant files, and obviously dynamic
> library is not the case. They should be placed under <prefix>/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.

So you are saying that the Lisp part of a module should be installed
under /usr/share/emacs/site-list, and it's shared-library part under
/usr/lib?  Wouldn't this complicate things?

I'm not sure I understand the problem: doesn't a module normally come
with a Lisp interface file?  And if so, couldn't the module solve this
inside the Lisp part, e.g., load the shared-library file explicitly?
IOW, why do we need to treat this situation specially?

Failing that, how about arranging for architecture-dependent
subdirectories under site-lisp instead?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-15 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 11:00 Dedicated search path variable for architecture-dependant loadable file Zhu Zihao
2021-01-15 11:34 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).