Skip to content

Commit d3b895d

Browse files
committed
refactor to workspace mode
1 parent e08fb73 commit d3b895d

28 files changed

+101
-64
lines changed

Cargo.lock

Lines changed: 41 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
[package]
2-
name = "luals-rust"
3-
version = "0.1.0"
4-
edition = "2021"
5-
license-file = "LICENSE"
6-
include = ["resources/**/*"]
1+
[workspace]
2+
resolver = "2"
3+
members = [
4+
"crates/*",
5+
]
76

8-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
9-
10-
[dependencies]
7+
[workspace.dependencies]
118
mlua = { version = "0.10.0-beta.2", features = [ "lua54", "vendored", "async"] }
129
lazy_static = "1.4.0"
1310
encoding_rs = "0.8"
1411
tokio = { version = "1.40.0", features = ["full"] }
1512
notify = { version = "6.1.1", features = ["serde"] }
16-
17-
[build-dependencies]
18-
cc = "1.0"
19-
glob = "0.3.0"
20-
21-
[[bin]]
22-
name = "lua-language-server"
23-
path = "src/main.rs"
24-
25-
[features]
26-
no_format = []
27-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To build the project, run:
2323

2424
```bash
2525
git submodule update --init --recursive
26-
cargo build
26+
cargo build --release -p luals
2727
```
2828

2929
# Publish

crates/basic/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "luals-basic"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
mlua.workspace = true
8+
lazy_static.workspace = true
9+
encoding_rs.workspace = true
10+
tokio.workspace = true
11+
notify.workspace = true
12+
13+
14+
[build-dependencies]
15+
cc = "1.0"
16+
glob = "0.3.0"
17+
18+
[features]
19+
no_format = []

build.rs renamed to crates/basic/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
fn main() {
22
std::env::set_var("CC_LOG", "1");
3+
std::env::set_current_dir("../..").unwrap();
34
// build_lua();
45
build_lua_seri();
56
build_lpeglabel();
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)