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

Any support for installing gleam CLI applications directly in OS shell like Rust's cargo install? #4105

Open
enkerewpo opened this issue Dec 23, 2024 · 2 comments

Comments

@enkerewpo
Copy link
Contributor

enkerewpo commented Dec 23, 2024

I just figured out that Gleam uses export erlang-shipment, etc. for package exports targeting Erlang, Javascript, Typescript. Moreover, the Gleam's package index seems to only support adding development packages for a project. I searched some Gleam CLI projects on Github and their solutions are writing the Makefile and use make install to design a customized "installation" on the OS (which also requires you to download the source code manually).

Will there be a CLI application installation support like Rust's cargo install(which can install packages that marked as [[bin]] or [[example]]?

I know that Rust compiles to native programs and Gleam's generated code runs on VMs which is probably making it different for designing the "cargo install" mechanism for Gleam.

@enkerewpo enkerewpo changed the title Any support for install gleam CLI applications directly in OS shell like Rust's cargo install [binary_package_name]? Any support for installing gleam CLI applications directly in OS shell like Rust's cargo install [binary_package_name]? Dec 23, 2024
@enkerewpo enkerewpo changed the title Any support for installing gleam CLI applications directly in OS shell like Rust's cargo install [binary_package_name]? Any support for installing gleam CLI applications directly in OS shell like Rust's cargo install? Dec 23, 2024
@lpil
Copy link
Member

lpil commented Dec 23, 2024

Gleam doesn't compile to native or have a canonical runtime or one that it manages, so it's unclear how this could be officially supported.

You could use projects such as gleescript and JavaScript bundlers to create a single file containing all your compiled code, but you'd need to manage the runtime and installation still.

If you have any ideas for how this might work that would be cool!

@enkerewpo
Copy link
Contributor Author

ok 🥹, I will investigate it if I have time and maybe figure out some mechanism

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

No branches or pull requests

2 participants