Skip to content

NewTec-GmbH/lobster-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lobster-rust

License Repo Status

Rust tool to process Rust projects for BMWs lobster.

This tool processes Rust source code with lobster annotations / tracing tags into the lobster common interchange format.

lobster-rust is currently in development and does not meet the full planned feature set and maturity.

Currently supported features are:

  • Extraction of tracing tags in Rust source code.
  • Output in the lobster common interchange format.

Currently NOT supported is:

  • Special parsing of test code.

To get an overview of what is currently worked on, check out the issues tab.

Used Libraries

Used 3rd party libraries which are not part of the standard Rust package:

Crate Description License
ra_ap_syntax Syntax Tree crate of the rust-analyzer MIT or Apache-2.0 License
ra_ap_edition Rust Edition Enum of the rust-analyzer MIT or Apache-2.0 License
json Json implementation for Rust MIT or Apache-2.0 License
regex Regular expressions for Rust MIT or Apache-2.0 License
clap Command line argument parser for Rust MIT or Apache-2.0 License

Installation

To build lobster-rust yourself, you will need to have Rust and Cargo installed. Clone the repository and build the project using cargo via cargo build --release. This will build a lobster-rust executable in the ./target/release/ directory.

For prebuild releases, see the Release page of the repository.

Usage

lobster-rust is a CLI tool and is configured via command line arguments.

> lobster-rust.exe --help
Usage: lobster-rust.exe [OPTIONS] [DIR] [OUT]

Arguments:
  [DIR]  Directory of main.rs (or lib.rs) [default: ./src/]
  [OUT]  Output directory for the .lobster file [default: rust.lobster]

Options:
  -l, --lib                    Parse lib.rs as project root instead of main.rs
      --activity               Generate activity traces (tests) instead of an implementation trace. UNSUPPORTED
      --only-tagged-functions  Only trace functions with tags. UNSUPPORTED
  -h, --help                   Print help
  -V, --version                Print version

Because of sensible defaults, a simple cargo project should require no flags at all. lobster-rust expects a main.rs (or lib.rs with the --lib flag) in ./src/. Any submodules included are resolved by lobster-rust itself.

A rust.lobster output file in the common interchange format (json based) is created in the cwd.

Documentation

The code is fully covered with doc comments, allowing the creation of extensive documentation via cargo doc. Detailed documentation about the tool can be found in the doc/ folder.

The full source code shall be compliant to the Rust Style Guide.

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create an issue or if you are able and willing to fix it by yourself, fork the repository and create a pull request.

License

The lobster-rust source code is published under BSD-3-Clause.

Consider the different licenses of the used third party libraries too!

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

About

Rust tool to process Rust projects for BMWs LOBSTER.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages