12 releases (5 breaking)

0.5.0 Dec 28, 2023
0.4.3 Dec 2, 2023
0.4.2 Nov 25, 2023
0.3.0 Oct 5, 2023
0.0.0-placeholder Nov 4, 2022

#144 in Hardware support

Download history 59/week @ 2023-12-21 111/week @ 2023-12-28 170/week @ 2024-01-04 70/week @ 2024-01-11 125/week @ 2024-01-18 69/week @ 2024-01-25 178/week @ 2024-02-01 78/week @ 2024-02-08 159/week @ 2024-02-15 78/week @ 2024-02-22 45/week @ 2024-02-29 97/week @ 2024-03-07 98/week @ 2024-03-14 47/week @ 2024-03-21 23/week @ 2024-03-28 71/week @ 2024-04-04

249 downloads per month
Used in marker_rustc_driver

MIT/Apache

370KB
7K SLoC

Marker Adapter 🔌

Crates.io License: MIT OR Apache-2.0

This crate provides a common interface for drivers to communicate with lint crates for Marker. It does some heavy lifting which would otherwise need to be done by each individual driver. You're welcome to check out Marker's Readme if you're interested in the project.

Warning

This crate is not part of Marker's official API, it's only intended to be used by drivers.

Functions

Driver -> Lint Crate Communication

The adapter can load a list of lint crates and send information from the driver to all lint crates. The adapter and API takes care of safe ABI communication between the driver and lint crates.

Lint Crate -> Driver Communication

Marker's API requires some callbacks from the lint crates into the driver. The adapter can deal with all the ABI conversions, drivers only need to implement the DriverContext trait provided by the adapter.

Creating an adapter instance

An adapter instance can be created from the environment. For this, the following environment values are read:

  • MARKER_LINT_CRATES: A semicolon separated list of crate name and absolute path pairs. Each pair is internally separated by a colon.

Contributing

Contributions are highly appreciated! If you encounter any issues or have suggestions for improvements, please check out Marker's GitHub repository.

License

Copyright (c) 2022-2023 Rust-Marker

Rust-marker is distributed under the terms of the MIT license or the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT.

Dependencies

~6–16MB
~191K SLoC