Parse callbacks should be able to tell whether an item is allowlisted
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
Línea de trabajo
The relevant entry points are the parse callbacks, in particular blocklisted_type_implements_trait, which the reporter says does not fire for every blocklisted item. The reproduction is the linked bl-proto-ref/build.rs, whose generated bl_sockaddr.rs references SOCKADDR_FIELDS types that were never emitted. Done would mean an API that tells callbacks whether an item will be emitted, including recursively allowlisted types, and this needs maintainer input on the design first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Right now, it appears that parse callbacks are called on everything found in the input headers, whether or not the item involved is actually going to be emitted. This is inconvenient for using parse callbacks to emit additional information about the types that you are going to emit -- example here: https://codeberg.org/zwol/ip_banhammer/src/commit/2108977c637fb3a3af22be7ffeb12674bbe1a1fe/bl-proto-ref/build.rs If you run this as it is right now and look at the generated bl_sockaddr.rs, you'll see that the SOCKADDR_FIELDS constant refers to a whole bunch of types that we didn't generate bindings for, they just happen to be declared in the same C system headers as the ones that are allowlisted. (Ignore make_libblocklist_bindings in the same file, that's unrelated to the issue.)
I imagine that many of the parse callbacks are happening too early to know whether the top-level item is going to be emitted or not, but it would be really helpful to have some way to be informed of the set of things that will (or, equivalently, won't) be emitted. (In the example, you can see I tried to use blocklisted_type_implements_trait for that, but it didn't get called for all the blocklisted items so it didn't help.)
I can't just hardcode the set of things that are allowlisted up front, because in this case I need to get the recursively allowlisted types also.
- Lenguaje dominante
- Rust
- Estrellas
- 5.3k
- Forks
- 846
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rust-lang/rust-bindgen
-
--enable-cxx-namespaces panics on namespace [[deprecated]] { ("[" is not a valid Ident)Posiblemente ocupada @lwz23 la tomó hace 49 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
rust-lang/rust-bindgen#3485 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rust-lang/rust-bindgen#3483 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
rust-lang/rust-bindgen#3370 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
rust-lang/rust-bindgen#3363 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
rust-lang/rust-bindgen#3540 ·
Los mantenedores suelen responder en 1 día
Todos los issues de rust-lang/rust-bindgen
Issues similares
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area:ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openfootmanager/openfootmanager#1365 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
JackMechem/marbble#305 ·
Los mantenedores suelen responder en 1 día
-
ci:stability
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 5 días
-
antora bug review-2026-11-11
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bovinemagnet/AdocFoundry#546 ·
Los mantenedores suelen responder en 1 día