73 releases (32 stable)

2.9.0-dev.0 Oct 20, 2024
2.8.2 Sep 8, 2024
2.7.0-rc.3 Jul 16, 2024
2.6.3 Mar 12, 2024
0.1.0 Jan 4, 2023

#2 in #scarb

Download history 827/week @ 2024-07-16 943/week @ 2024-07-23 1466/week @ 2024-07-30 1749/week @ 2024-08-06 2929/week @ 2024-08-13 1570/week @ 2024-08-20 1353/week @ 2024-08-27 2092/week @ 2024-09-03 2019/week @ 2024-09-10 1575/week @ 2024-09-17 978/week @ 2024-09-24 1251/week @ 2024-10-01 1334/week @ 2024-10-08 932/week @ 2024-10-15 495/week @ 2024-10-22 558/week @ 2024-10-29

3,812 downloads per month
Used in cairo-language-server

Custom license

6MB
103K SLoC

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_lang_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_lang_language_server::Tricks;

fn main() {
    let mut tricks = Tricks::default();
    tricks.extra_plugin_suites = Some(&|| vec![dojo_plugin_suite()]);
    cairo_lang_language_server::start_with_tricks(tricks);
}

Dependencies

~24–37MB
~565K SLoC