dap-rs, a Rust implementation of the Debug Adapter Protocol
Introduction
This crate is a Rust implementation of the Debug Adapter Protocol (or DAP for short).
The best way to think of DAP is to compare it to LSP (Language Server Protocol) but for debuggers. The core idea is the same: a protocol that serves as lingua franca for editors and debuggers to talk to each other. This means that an editor that implements DAP can use a debugger that also implements DAP.
In practice, the adapter might be separate from the actual debugger. For example, one could implement an adapter that writes commands to the stdin of a gdb subprocess, then parses the output it receives (this is why it's called an "adapter" - it adapts the debugger to editors that know DAP).
Stability
This crate is in a fairly early stage and breakages will be frequent. Any version before 1.0 might be a breaking version.
Minimal example
To get started, create a binary project and add dap
to your Cargo.toml:
[]
= "dummy-server"
= "*"
= "2021"
[]
= "*"
Our dummy server is going to read its input from a text file and write the output to stdout.
use File;
use ;
use Error;
use *;
type DynResult<T> = Result;
License
This library is dual-licensed as MIT and Apache 2.0. That means users may choose either of these licenses. In general, these are non-restrictive, non-viral licenses, a.k.a. "do what you want but no guarantees from me".
Commercial support is available on a contract basis (contact me: szelei.t@gmail.com).