Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stance on packages using non-C native modules #51

Open
paulsnar opened this issue Jul 29, 2022 · 1 comment
Open

Stance on packages using non-C native modules #51

paulsnar opened this issue Jul 29, 2022 · 1 comment
Labels
question Further information is requested

Comments

@paulsnar
Copy link

As of now, most packages that I can find in the index are written either fully natively in Janet, or with C components, which then are built by jpm. But modules can be written in other languages that can compile down to a .so/.a that's suitable for linking with Janet: using bindings such as jzignet for Zig or JanetRS for Rust, it's possible, through some jumping of hoops, to create native modules that can even be used as though they were any other native module, including compiling into a static binary.

Building a non-C native module usually has extra dependencies though, such as the native language compiler and possibly the bindings (as in the case of Zig which doesn't have a package manager of its own like Rust's cargo, at least not yet), and therefore just jpm installing such modules is likely to not work if the user doesn't have the necessary ambient dependencies installed beforehand.

As such, I wanted to raise a question whether such non-C native-using packages are in scope for pkgs, given their requirement for ambient dependencies that I don't believe jpm can currently express. If so, I feel like there should also be a base expectation of jpm being able to build such a package in its entirety (e.g., via jpm build, presumably using jpm's shell fn), if the necessary dependencies are present.

@pepe pepe added the question Further information is requested label Jul 30, 2022
@pepe
Copy link
Member

pepe commented Jul 30, 2022

This is a good future-oriented question, as I am not aware of any meaningful package built via other than C language bindings.

My personal view at the moment is that if it is not possible to build the package with jpm build from vanilla installation, then it doesn't belong to this registry.

But @bakpakin is the judge here as always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants