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

potentially use mlua and luarocks to build rust code #3

Closed
benlubas opened this issue Oct 6, 2024 · 11 comments · Fixed by #105
Closed

potentially use mlua and luarocks to build rust code #3

benlubas opened this issue Oct 6, 2024 · 11 comments · Fixed by #105

Comments

@benlubas
Copy link
Contributor

benlubas commented Oct 6, 2024

Hey this project was brought to my attention recently and it seems really cool. I'm wondering if you're aware of mlua and the luarocks build backend for it.

I'd imagine this could allow you to very easily distribute this plugin on luarocks, and users would then be able to pull from luarocks and build the plugin themselves. For an example of a neovim plugin that uses mlua, there's benlubas/neorg-se.

I'd be happy to submit a PR if this seems interesting.

@Saghen
Copy link
Owner

Saghen commented Oct 6, 2024

I'm very interested! Especially considering the library I'm using isn't maintained anymore and distributing pre-built binaries was a bit of a pain. I noticed on your neorg-se project that lazy.nvim requires extra external dependencies for this to work. Is that an unavoidable issue?

@benlubas
Copy link
Contributor Author

benlubas commented Oct 6, 2024

ahh, that's actually left over from the past. I should remove that from the readme. The build will work fine with lazy, as long as you setup the github workflow correctly.

@benlubas
Copy link
Contributor Author

benlubas commented Oct 6, 2024

And I'll work on a PR later today

@Saghen
Copy link
Owner

Saghen commented Oct 6, 2024

Sounds great, main thing I'd like to see is how it handles the pre-built binaries since asking people to have a nightly toolchain installed isn't ideal

@benlubas
Copy link
Contributor Author

benlubas commented Oct 7, 2024

oh true I forgot about nightly :/

I'm not sure that it can do prebuilt binaries. But it might be able to. I'll remember to test with that

@calops
Copy link

calops commented Oct 7, 2024

It's a crutch, but wouldn't it be possible, through github actions, to maintain a nightly release with prebuilt binaries for the latest commit on main?

@benlubas benlubas mentioned this issue Oct 8, 2024
@Saghen
Copy link
Owner

Saghen commented Oct 8, 2024

Where would the artifacts be stored? Afaik github actions artifacts have a 30 day expiry

@mrcjkb
Copy link

mrcjkb commented Oct 8, 2024

Where would the artifacts be stored? Afaik github actions artifacts have a 30 day expiry

You could use GitHub pages.
We do that with our rocks-binaries project (which both rocks.nvim and lazy.nvim can pull from).

@calops
Copy link

calops commented Oct 8, 2024

I'm not talking about hosting github action artifacts, but releasing these assets in an actual github release (like you're doing already, but only for whole versions).

But yeah, github pages could work as well.

@mrcjkb
Copy link

mrcjkb commented Oct 8, 2024

If you end up using mlua instead of FFI (which would remove the luajit dependency), it might make sense to extract that into its own library with its own release cycle.

@calops
Copy link

calops commented Oct 8, 2024

If you end up using mlua instead of FFI (which would remove the luajit dependency), it might make sense to extract that into its own library with its own release cycle.

That does sound like the best strategy here.

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

Successfully merging a pull request may close this issue.

4 participants