Comments (5)
I've done some research on the topic. The current way is definitely unstable and since the type layout can change between compilation I'm surprised that it has been working without a problem so far. ^^ I believe this issue is critical, as it might affect how we can represent information for lints.
I'll create an issue for this in the design repo, as we might get some more feedback there and do some experimenting with this.
from marker.
Looking into this, I feel like creating a general plugin system for Rust could be a rust-foundation grant all in itself. 😅
from marker.
It certainly could be! Plugin systems are by no means easy.
from marker.
Yeah, I sadly see no good way, without a stable ABI. One option could be to introduce a stable ABI similar to #[repr(C)]
which allows support for rust types. This should be fine when it's not the default. On the other hand, I'm far from an expert, and c/c++ has some problems that come from the chosen ABI so 🤷.
from marker.
With the lint crate api rework of #34 and #35 I believe that we can close this issue. The linter will for now use dynamic libraries. I also heard an interesting idea to potentially add static linking for static and performance focussed implementations. This is still a good idea, but I feel like that would require a discussion in the /design repo.
Problems with the FFI interface will be tracked in a new issue 🙃
from marker.
Related Issues (20)
- [Feat]: Provide a way to automatically fix lints with `--fix` flag HOT 2
- Use consistent naming `fn pat()` vs `fn pattern()`
- [Bug]: `marker_uitest` doesn't work in a workspace with rust-toolchain.toml file that uses `1.71` HOT 1
- [Bug]: Marker panics when the item identifier from macro expansion is debug-printed.
- [Bug]: Maker panics if the trait from `std` is requested via `ctx.ast().item()` HOT 2
- `FnItem::ident()` should return `Ident` instead of `Option<Ident>`
- [Feat]: Make `cargo test --doc` work with the lint crates to doc test examples HOT 2
- [Feat]: Add a method to check if type implements a trait HOT 2
- Chore: Bump nightly -> 2023-12-28
- [Bug]: `cargo marker setup --auto-install-toolchain` fails with E0554 `#[feature]` on stable channel HOT 14
- [Bug]: `cargo uitest` fails with `[E0463]: can't find crate for std` HOT 11
- [Panic]: broken on_unimplemented "{float}{_Self}{crate_local}{Trait}{ItemContext}" for <() as Baz>: no argument matching "crate_local
- [Panic]: `&MarkerConverterInner::lang_item_map` doesn't contain `TryTraitFromOutput
- [Panic]: assertion failed: 4 == 3
- [Panic]: unimplemented: type aliases / assoc type bounds
- [Panic]: not implemented: lifetimes?
- [Panic]: `this should be a literal expression Expr {`
- [Panic]: None / expected fulfillment errors
- [Panic]: no type for local variable
- [Panic]: unreachable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marker.