66 releases (33 stable)
new 2.10.0-rc.1 | Jan 16, 2025 |
---|---|
2.9.2 | Dec 11, 2024 |
2.9.1 | Nov 29, 2024 |
2.7.0-rc.3 | Jul 16, 2024 |
2.1.0-rc2 | Jul 25, 2023 |
#718 in Magic Beans
210 downloads per month
420KB
8K
SLoC
CairoLS
CairoLS is an implementation of Language Server Protocol for the Cairo language. Cairo is the first Turing-complete language for creating provable programs for general computation.
Quick start
CairoLS is distributed along with the Scarb package manager. To get started, install Scarb and the Cairo extension for your editor.
For Visual Studio Code, install the Visual Studio Code Cairo 1.0 extension from the marketplace.
For other editors that support LSP,
you can point the editor to the scarb cairo-language-server
command to start the server.
Support
For questions about CairoLS and official editor extensions, reach out to us on Telegram.
lib.rs
:
CairoLS
Implements the LSP protocol over stdin/out.
Running vanilla
This is basically the source code of the cairo-language-server
and
scarb cairo-language-server
binaries.
fn main() {
cairo_language_server::start();
}
Running with customizations
Due to the immaturity of various Cairo compiler parts (especially around potentially
dynamically-loadable things), for some projects it might be necessary to provide a custom build
of CairoLS that includes custom modifications to the compiler.
The start_with_tricks
function allows building a customized build of CairoLS that supports
project-specific features.
See the Tricks
struct documentation for available customizations.
use cairo_language_server::Tricks;
fn main() {
let mut tricks = Tricks::default();
tricks.extra_plugin_suites = Some(&|| vec![dojo_plugin_suite()]);
cairo_language_server::start_with_tricks(tricks);
}
Dependencies
~35–49MB
~790K SLoC