diff --git a/Cargo.lock b/Cargo.lock index 649b1cea2..e7f290452 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5207,7 +5207,7 @@ dependencies = [ [[package]] name = "yara-x" -version = "1.12.0" +version = "1.13.0" dependencies = [ "aho-corasick", "annotate-snippets", @@ -5280,7 +5280,7 @@ dependencies = [ [[package]] name = "yara-x-capi" -version = "1.12.0" +version = "1.13.0" dependencies = [ "assert-call", "cbindgen", @@ -5290,7 +5290,7 @@ dependencies = [ [[package]] name = "yara-x-cli" -version = "1.12.0" +version = "1.13.0" dependencies = [ "anyhow", "assert_cmd", @@ -5328,7 +5328,7 @@ dependencies = [ [[package]] name = "yara-x-fmt" -version = "1.12.0" +version = "1.13.0" dependencies = [ "bitflags 2.10.0", "bstr", @@ -5342,7 +5342,7 @@ dependencies = [ [[package]] name = "yara-x-ls" -version = "0.0.6" +version = "0.0.7" dependencies = [ "async-lsp", "bitflags 2.10.0", @@ -5363,7 +5363,7 @@ dependencies = [ [[package]] name = "yara-x-macros" -version = "1.12.0" +version = "1.13.0" dependencies = [ "darling", "proc-macro2", @@ -5373,7 +5373,7 @@ dependencies = [ [[package]] name = "yara-x-parser" -version = "1.12.0" +version = "1.13.0" dependencies = [ "anyhow", "ascii_tree", @@ -5396,7 +5396,7 @@ dependencies = [ [[package]] name = "yara-x-proto" -version = "1.12.0" +version = "1.13.0" dependencies = [ "protobuf", "protobuf-codegen", @@ -5404,7 +5404,7 @@ dependencies = [ [[package]] name = "yara-x-proto-json" -version = "1.12.0" +version = "1.13.0" dependencies = [ "base64 0.22.1", "globwalk", @@ -5418,7 +5418,7 @@ dependencies = [ [[package]] name = "yara-x-proto-yaml" -version = "1.12.0" +version = "1.13.0" dependencies = [ "chrono", "globwalk", @@ -5432,7 +5432,7 @@ dependencies = [ [[package]] name = "yara-x-py" -version = "1.12.0" +version = "1.13.0" dependencies = [ "base64 0.22.1", "protobuf", diff --git a/Cargo.toml b/Cargo.toml index caa2db507..52c8ed099 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "1.12.0" +version = "1.13.0" authors = ["Victor M. Alvarez "] edition = "2021" homepage = "https://virustotal.github.io/yara-x" @@ -103,14 +103,13 @@ walrus = "0.24.3" wasmtime = { version = "40.0.3", default-features = false } x509-parser = "0.18.0" yansi = "1.0.1" -yara-x = { path = "lib", version = "1.12.0", default-features = false } -yara-x-fmt = { path = "fmt", version = "1.12.0" } -yara-x-macros = { path = "macros", version = "1.12.0" } -yara-x-parser = { path = "parser", version = "1.12.0" } -yara-x-proto = { path = "proto", version = "1.12.0"} -yara-x-proto-yaml = { path = "proto-yaml", version = "1.12.0" } -yara-x-proto-json = { path = "proto-json", version = "1.12.0" } -yara-x-ls = { path = "ls", version = "0.1.0" } +yara-x = { path = "lib", version = "1.13.0", default-features = false } +yara-x-fmt = { path = "fmt", version = "1.13.0" } +yara-x-macros = { path = "macros", version = "1.13.0" } +yara-x-parser = { path = "parser", version = "1.13.0" } +yara-x-proto = { path = "proto", version = "1.13.0"} +yara-x-proto-yaml = { path = "proto-yaml", version = "1.13.0" } +yara-x-proto-json = { path = "proto-json", version = "1.13.0" } zip = "6.0.0" simd-adler32 = "0.3.7" simd_cesu8 = "1" diff --git a/ls/Cargo.toml b/ls/Cargo.toml index e92b4098a..b12d5452a 100644 --- a/ls/Cargo.toml +++ b/ls/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true license.workspace = true rust-version.workspace = true repository.workspace = true -version = "0.0.6" +version = "0.0.7" [lib] name = "yara_x_ls" diff --git a/site/content/blog/introducing-language-server/demo.gif b/site/content/blog/introducing-language-server/demo.gif new file mode 100644 index 000000000..9d8e60924 Binary files /dev/null and b/site/content/blog/introducing-language-server/demo.gif differ diff --git a/site/content/blog/introducing-language-server/index.md b/site/content/blog/introducing-language-server/index.md new file mode 100644 index 000000000..a09392cb4 --- /dev/null +++ b/site/content/blog/introducing-language-server/index.md @@ -0,0 +1,63 @@ +--- +title: "Introducing the YARA language server" +description: "Introducing an official Language Server for YARA, implemented on top of YARA-X" +summary: "" +date: 2026-02-03T00:00:00+01:00 +lastmod: 2026-02-03T00:00:00+01:00 +draft: false +weight: 50 +categories: [ ] +tags: [ ] +contributors: [ "Victor M. Alvarez" ] +pinned: false +homepage: false +seo: + title: "" # custom title (optional) + description: "" # custom description (recommended) + canonical: "" # custom canonical URL (optional) + noindex: false # false (default) or true +--- +From the very beginning of the YARA-X project, our goal was not only to modernize the YARA engine itself but also to +revolutionize the entire experience of writing YARA rules. We knew that performance and expressiveness were critical, +but we also recognized that the day-to-day workflow of security researchers and developers needed a significant +upgrade. Today, we are thrilled to announce a major step towards that vision: the official YARA-X Language Server. + +### What is a Language Server? + +For those unfamiliar with the term, a Language Server is a dedicated background process that acts as a "brain" for +a specific language. Your favorite code editor (like VS Code, Sublime Text, or Vim) communicates with this server +to provide intelligent, context-aware features. This approach, based on the Language Server Protocol (LSP), means +that we can build a single, powerful engine for YARA-X and have it work across a wide range of editors without +having to write a new extension from scratch for each one. + +### A Smarter Way to Write YARA Rules + +So, what does the YARA-X Language Server mean for you? Here are some of the key features available today: + +* **Real-time Diagnostics:** Say goodbye to the slow feedback loop of writing a rule, saving it, and running + it through a compiler only to find a simple syntax error. The language server analyzes your code as you type, + highlighting mistakes and providing descriptive errors on the fly. + +* **Advanced Autocompletion:** The server provides intelligent suggestions for module identifiers + (e.g., `pe.`, `cuckoo.`), keywords, and more. This not only speeds up your writing but also helps you discover + the rich features available in YARA-X without constantly referencing documentation. + +* **Go to Definition:** Working with large, complex rule sets that span multiple files? You can now instantly jump + to the definition of a rule or pattern, making it easier to navigate and understand your rules. + +* **Automatic Formatting:** Keep your YARA rules consistent and clean with automatic code formatting. The language + server can automatically format your code according to best practices, saving you time and ensuring readability. + +![demo.gif](demo.gif) + +### Get Started Today + +The YARA-X Language Server is now available for Visual Studio Code. It's currently in beta, but you can install +it from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=virustotal.yara-x-ls) and +start using it already. + +This is just the beginning. We plan to continue enhancing the language server with more powerful features, and we +encourage the community to integrate it with other editors. + +We are incredibly excited to get this into your hands. Try it out, and let us know what you think by opening an +issue on our [GitHub repository](https://github.com/VirusTotal/yara-x). Happy hunting! diff --git a/site/hugo_stats.json b/site/hugo_stats.json index 4f49ffa3e..d46fc3bce 100644 --- a/site/hugo_stats.json +++ b/site/hugo_stats.json @@ -338,8 +338,11 @@ "TableOfContents", "__init__relaxed_re_syntaxfalse", "a-quick-refresher-what-are-atoms", + "a-smarter-way-to-write-yara-rules", "a-smarter-yara-x-for-everyone", "absint", + "accessflag", + "accessflagspecial", "add_include_dirpath", "add_sourcestring-originnone", "aligning-metadata-and-patterns", @@ -364,15 +367,20 @@ "calculate_checksum", "certificate", "characteristics", + "checksum", "checksum32offset-size", "checksum32string", "choosing-the-number-of-spaces-for-indentation", "class", + "classitem", "comments", "compile", "compileerror", "compiler", "conclusion", + "contains_class", + "contains_method", + "contains_string", "converting-ndjson-to-standard-json", "countbyte-offset-size", "countersignature", @@ -392,9 +400,11 @@ "crc32string", "data-consistency-in-overlapping-blocks", "define_globalidentifier-value", + "deserialize_fromfile", "deviationoffset-size-mean", "deviationstring-mean", "device_type", + "dexheader", "differences-in-base64-patterns", "directoryentry", "direntry", @@ -451,6 +461,7 @@ "fat_header", "fatarch", "fewer-timeouts", + "fielditem", "file", "file-size", "file_flag", @@ -466,6 +477,7 @@ "function", "functions", "further-reading", + "get-started-today", "getting-started-with-the-configuration-file", "global-rules", "go-api", @@ -529,6 +541,8 @@ "logmessage-string", "logstring", "machine", + "mapitem", + "maplist", "mask_64bit", "match", "match-lengths", @@ -542,6 +556,7 @@ "metadata", "metadata-validation", "method", + "methoditem", "minint-int", "minversion", "modeoffset-size", @@ -577,7 +592,9 @@ "pattern", "patterns", "percentagebyte-offset-size", + "permhash", "private-rules", + "protoitem", "query", "reading-data-at-a-given-offset", "referencing-other-rules", @@ -618,6 +635,7 @@ "segmenttype", "serial_correlationoffset-size", "serial_correlationstring", + "serialize_intofile", "set_globalidentifier-value", "set_timeoutseconds", "sets-of-patterns", @@ -660,6 +678,7 @@ "toc", "trackerdata", "type", + "typecode", "usage", "using-xor-and-fullword-together", "version", @@ -667,6 +686,7 @@ "warnings", "what-are-unsatisfiable-expressions", "what-changes-for-our-users", + "what-is-a-language-server", "whats-next", "whats-the-current-state-of-yara-x", "when-smarter-backfires", @@ -691,6 +711,7 @@ "yrx_compiler_ignore_module", "yrx_compiler_new_namespace", "yrx_compiler_warnings_json", + "yrx_console_callback", "yrx_finalize", "yrx_import_callback", "yrx_last_error", @@ -727,6 +748,7 @@ "yrx_scanner_destroy", "yrx_scanner_finish", "yrx_scanner_iter_slowest_rules", + "yrx_scanner_on_console_log", "yrx_scanner_on_matching_rule", "yrx_scanner_scan", "yrx_scanner_scan_block",