Skip to content

Stance on packages using non-C native modules #51

@paulsnar

Description

@paulsnar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions