77 releases (36 stable)

new 2.9.2 Dec 11, 2024
2.9.1 Nov 29, 2024
2.9.0-dev.0 Oct 20, 2024
2.7.0-rc.3 Jul 16, 2024
0.1.0 Jan 4, 2023

#520 in Magic Beans

Download history 1174/week @ 2024-08-26 1973/week @ 2024-09-02 1990/week @ 2024-09-09 1816/week @ 2024-09-16 1039/week @ 2024-09-23 890/week @ 2024-09-30 1644/week @ 2024-10-07 988/week @ 2024-10-14 527/week @ 2024-10-21 611/week @ 2024-10-28 520/week @ 2024-11-04 259/week @ 2024-11-11 461/week @ 2024-11-18 658/week @ 2024-11-25 376/week @ 2024-12-02 451/week @ 2024-12-09

1,966 downloads per month
Used in cairo-language-server

Custom license

6.5MB
109K 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

~28–42MB
~667K SLoC