61 releases (26 stable)

2.7.0-dev.0 May 22, 2024
2.6.3 Mar 12, 2024
2.6.0-rc.1 Feb 14, 2024
2.5.0-dev.0 Dec 26, 2023
0.1.0 Jan 4, 2023

#1049 in Magic Beans

Download history 1088/week @ 2024-02-14 733/week @ 2024-02-21 779/week @ 2024-02-28 1118/week @ 2024-03-06 678/week @ 2024-03-13 410/week @ 2024-03-20 558/week @ 2024-03-27 562/week @ 2024-04-03 473/week @ 2024-04-10 428/week @ 2024-04-17 564/week @ 2024-04-24 548/week @ 2024-05-01 553/week @ 2024-05-08 759/week @ 2024-05-15 1075/week @ 2024-05-22 562/week @ 2024-05-29

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

Custom license

5MB
90K 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

~25–39MB
~604K SLoC