Start switching JSON LSP adapter to plugin (take 2)

This commit is contained in:
Isaac Clayton 2022-06-03 14:42:50 +02:00
parent 35b2eff29c
commit 7dd3114a7a
22 changed files with 372 additions and 100 deletions

80
plugins/Cargo.lock generated Normal file
View file

@ -0,0 +1,80 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "json_language"
version = "0.1.0"
dependencies = [
"plugin",
]
[[package]]
name = "plugin"
version = "0.1.0"
dependencies = [
"bincode",
"plugin_macros",
"serde",
]
[[package]]
name = "plugin_macros"
version = "0.1.0"
dependencies = [
"bincode",
"proc-macro2",
"quote",
"serde",
"syn",
]
[[package]]
name = "proc-macro2"
version = "1.0.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
dependencies = [
"proc-macro2",
]
[[package]]
name = "serde"
version = "1.0.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
[[package]]
name = "syn"
version = "1.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"

2
plugins/Cargo.toml Normal file
View file

@ -0,0 +1,2 @@
[workspace]
members = ["./json_language"]

View file

@ -0,0 +1,10 @@
[package]
name = "json_language"
version = "0.1.0"
edition = "2021"
[dependencies]
plugin = { path = "../../crates/plugin" }
[lib]
crate-type = ["cdylib"]

View file

@ -0,0 +1,6 @@
use plugin::prelude::*;
#[bind]
pub fn add(a: (f64, f64)) -> f64 {
a.0 + a.1
}