Saghen / blink.cmp

Performant, batteries-included completion plugin for Neovim
MIT License
632 stars 27 forks source link

potentially use mlua and luarocks to build rust code #3

Open benlubas opened 4 days ago

benlubas commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

And I'll work on a PR later today

Saghen commented 4 days ago

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 commented 4 days ago

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 commented 3 days ago

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?

Saghen commented 3 days ago

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

mrcjkb commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

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 commented 2 days ago

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.