Skip to content

Commit

Permalink
feat: switch to mlua (#105)
Browse files Browse the repository at this point in the history
* ref: example using mlua

* feat: drop rockspec, deserialize in rust

* feat: restore release workflow

* feat: use blink.cmp.fuzzy.rust for rust module

* feat: support all platforms

* feat: improve multi-platform support

* fix: buffer source rust path

* feat: to be squashed

* feat: add back download script

* feat: drop unwraps, use cpath for rust loading

* feat: misc download cleanups

---------

Co-authored-by: Liam Dyer <[email protected]>
  • Loading branch information
benlubas and Saghen authored Oct 19, 2024
1 parent d91b587 commit 873680d
Show file tree
Hide file tree
Showing 16 changed files with 388 additions and 778 deletions.
17 changes: 17 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

[target.aarch64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]
201 changes: 88 additions & 113 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ version = "0.1.0"
edition = "2021"

[lib]
path = "lua/blink/cmp/fuzzy/ffi.rs"
path = "lua/blink/cmp/fuzzy/lib.rs"
crate-type = ["cdylib"]

[dependencies]
libc = "0.2.20"
c-marshalling = { git = "https://github.com/distil/rust_lua_ffi" }
lua-marshalling = { git = "https://github.com/distil/rust_lua_ffi" }
regex = "1.10.5"
lazy_static = "1.5.0"
frizbee = { git = "https://github.com/saghen/frizbee" }
serde = { version = "1.0.204", features = ["derive"] }
heed = "0.20.3"

[build-dependencies]
generator = { git = "https://github.com/distil/rust_lua_ffi" }
mlua = { version = "0.9.9", features = ["module", "luajit"] }
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
version = 'v0.*',
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- On musl libc based systems you need to add this flag
-- build = 'RUSTFLAGS="-C target-feature=-crt-static" cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',

Expand Down
Loading

0 comments on commit 873680d

Please sign in to comment.