75 releases (34 stable)

new 2.9.0 Nov 28, 2024
2.8.5 Nov 18, 2024
2.7.0-rc.3 Jul 16, 2024
2.6.3 Mar 12, 2024
0.1.0 Jan 4, 2023

#540 in Magic Beans

Download history 2469/week @ 2024-08-08 2160/week @ 2024-08-15 1526/week @ 2024-08-22 1547/week @ 2024-08-29 1921/week @ 2024-09-05 2109/week @ 2024-09-12 1457/week @ 2024-09-19 745/week @ 2024-09-26 1754/week @ 2024-10-03 910/week @ 2024-10-10 723/week @ 2024-10-17 583/week @ 2024-10-24 531/week @ 2024-10-31 403/week @ 2024-11-07 448/week @ 2024-11-14 269/week @ 2024-11-21

1,798 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

~29–43MB
~675K SLoC