MCPcopy Index your code
hub / github.com/PLC-lang/rusty

github.com/PLC-lang/rusty @v1.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.3 ↗ · + Follow
7,581 symbols 25,581 edges 392 files 978 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RuSTy

A structured text compiler written in Rust, utilizing the LLVM framework for native code compilation.

<a href="https://github.com/PLC-lang/rusty/tree/master/examples">Examples</a> | 
<a href="https://plc-lang.github.io/rusty/">Documentation</a> | 
<a href="https://github.com/PLC-lang/rusty/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22">Contributing</a>

Why RuSTy?

Structured Text is a popular language in the domain of automation. A standardized specification of the language (IEC 61131) was published in the 90s. It was updated several times in the meantime, while its initial spirit - being built for cyclic, robust and deterministic automation applications - still applies.

Several automation platform suppliers built proprietary compilers and runtime libraries, native to the vendor's hard- and software platform.

RuSTy is aiming towards a fast, modern and open-source industry-grade ST compiler for a wide range of platforms, sticking close to the standard.

Getting started

The easiest way to compile this project is to use the provided Dockerfile. The project offers a .devcontainer when using VSCode. The Dockerfile offers a linux-image which contains everything you need to run cargo build / cargo test in the project's root directory.

If you want to build the project without docker, start here.

Extension points exported contracts — how you extend this code

PipelineParticipantMut (Interface)
A Mutating Build particitpant for different steps in the pipeline Implementors can decide to modify the AST, project and [10 …
compiler/plc_driver/src/pipelines/participant.rs
Walker (Interface)
The `Walker` implements the traversal of the AST nodes and Ast-related objects (e.g. CompilationUnit). The `walk` method [26 …
compiler/plc_ast/src/visitor.rs
Debug (Interface)
A trait that represents a Debug builder An implementor of this trait will be called during various codegen phases to gen [15 …
src/codegen/debug.rs
Parseable (Interface)
(no doc) [13 implementers]
compiler/plc_xml/src/xml_parser.rs
DiagnosticReporter (Interface)
the DiagnosticReporter decides on the format and where to report the diagnostic to. possible implementations could print [4 …
compiler/plc_diagnostics/src/reporter.rs
SourceContainer (Interface)
SourceContainers offer source-code to be compiled via the load_source function. Furthermore it offers a location-String [2 …
compiler/plc_source/src/lib.rs
GeneratedHeader (Interface)
A combined trait containing all of the necessary implementations for generating a header [1 implementers]
compiler/plc_header_generator/src/header_generator.rs
Reporter (Interface)
(no doc) [3 implementers]
xtask/src/reporter.rs

Core symbols most depended-on inside this repo

clone
called by 1179
src/index/const_expressions.rs
new
called by 1140
tests/correctness/arrays.rs
map
called by 527
src/lowering/calls.rs
parse
called by 293
src/parser.rs
get_name
called by 255
src/validation/recursive.rs
advance
called by 245
src/lexer.rs
with_error_code
called by 230
compiler/plc_diagnostics/src/diagnostics.rs
get_type_information
called by 211
src/typesystem.rs

Shape

Function 5,213
Method 1,860
Class 359
Enum 106
Interface 43

Languages

Rust98%
TypeScript2%
C1%
C++1%

Modules by API surface

compiler/plc_ast/src/ast.rs207 symbols
src/index.rs206 symbols
src/codegen/tests/code_gen_tests.rs184 symbols
src/resolver/tests/resolve_expressions_tests.rs171 symbols
src/resolver.rs139 symbols
book/highlight.js129 symbols
libs/stdlib/src/string_functions.rs110 symbols
src/validation/tests/generic_validation_tests.rs102 symbols
src/typesystem.rs102 symbols
libs/stdlib/tests/num_conversion_tests.rs101 symbols
src/lowering/polymorphism/dispatch/interface.rs100 symbols
src/parser/tests/expressions_parser_tests.rs98 symbols

For agents

$ claude mcp add rusty \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page