Skip to content

Commit

Permalink
chore: push stdio implementation upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Sep 29, 2023
1 parent 7d31a7a commit 4901267
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 184 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ num-traits = "0.2"
# This is required to be able to run `cargo test` in acvm_js due to the `locals exceeds maximum` error.
# See https://ritik-mishra.medium.com/resolving-the-wasm-pack-error-locals-exceed-maximum-ec3a9d96685b
opt-level = 1

[patch.crates-io]
async-lsp = { git = "https://github.com/TomAFrench/async-lsp", branch = "tf/futures" }
3 changes: 1 addition & 2 deletions tooling/lsp_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ acvm.workspace = true
noir_lsp.workspace = true
tower.workspace = true
futures = { version = "0.3.28", default-features = false, features = ["async-await", "std", "executor"] }
rustix = { version = "0.38", default-features = false, features = [ "std", "fs" ] }
async-lsp = { version = "0.0.5", default-features = false, features = ["omni-trait"] }
async-lsp = { version = "0.0.5", default-features = false, features = ["omni-trait", "stdio"] }
2 changes: 1 addition & 1 deletion tooling/lsp_wasm/src/backend.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use acvm::BlackBoxFunctionSolver;

pub struct MockBackend;
pub(crate) struct MockBackend;

impl BlackBoxFunctionSolver for MockBackend {
fn schnorr_verify(
Expand Down
7 changes: 3 additions & 4 deletions tooling/lsp_wasm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use noir_lsp::NargoLspService;
use tower::ServiceBuilder;

mod backend;
mod stdio;

fn main() {
// let blackbox_solver = acvm::blackbox_solver::BarretenbergSolver::initialize().await;
Expand All @@ -18,10 +17,10 @@ fn main() {
.service(router)
});

let stdin = stdio::PipeStdin::lock().expect("stdin to lock");
let stdout = stdio::PipeStdout::lock().expect("stdout to lock");
let stdin = async_lsp::stdio::PipeStdin::lock().expect("stdin to lock");
let stdout = async_lsp::stdio::PipeStdout::lock().expect("stdout to lock");

futures::executor::block_on(async {
server.run_buffered(stdin, stdout).await.expect("server should start");
})
});
}
175 changes: 0 additions & 175 deletions tooling/lsp_wasm/src/stdio.rs

This file was deleted.

0 comments on commit 4901267

Please sign in to comment.