Skip to content

Commit 873680d

Browse files
benlubasSaghen
andauthored
feat: switch to mlua (#105)
* 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]>
1 parent d91b587 commit 873680d

16 files changed

+388
-778
lines changed

.cargo/config.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[target.x86_64-apple-darwin]
2+
rustflags = [
3+
"-C", "link-arg=-undefined",
4+
"-C", "link-arg=dynamic_lookup",
5+
]
6+
7+
[target.aarch64-apple-darwin]
8+
rustflags = [
9+
"-C", "link-arg=-undefined",
10+
"-C", "link-arg=dynamic_lookup",
11+
]
12+
13+
[target.x86_64-unknown-linux-musl]
14+
rustflags = ["-C", "target-feature=-crt-static"]
15+
16+
[target.aarch64-unknown-linux-musl]
17+
rustflags = ["-C", "target-feature=-crt-static"]

Cargo.lock

+88-113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-7
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ version = "0.1.0"
44
edition = "2021"
55

66
[lib]
7-
path = "lua/blink/cmp/fuzzy/ffi.rs"
7+
path = "lua/blink/cmp/fuzzy/lib.rs"
88
crate-type = ["cdylib"]
99

1010
[dependencies]
11-
libc = "0.2.20"
12-
c-marshalling = { git = "https://github.com/distil/rust_lua_ffi" }
13-
lua-marshalling = { git = "https://github.com/distil/rust_lua_ffi" }
1411
regex = "1.10.5"
1512
lazy_static = "1.5.0"
1613
frizbee = { git = "https://github.com/saghen/frizbee" }
1714
serde = { version = "1.0.204", features = ["derive"] }
1815
heed = "0.20.3"
19-
20-
[build-dependencies]
21-
generator = { git = "https://github.com/distil/rust_lua_ffi" }
16+
mlua = { version = "0.9.9", features = ["module", "luajit"] }

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
version = 'v0.*',
4141
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
4242
-- build = 'cargo build --release',
43-
-- On musl libc based systems you need to add this flag
44-
-- build = 'RUSTFLAGS="-C target-feature=-crt-static" cargo build --release',
4543
-- If you use nix, you can build from source using latest nightly rust with:
4644
-- build = 'nix run .#build-plugin',
4745

0 commit comments

Comments
 (0)