Cross compilation of server fails with async_trait

Abierto
#56 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust
Área
build-system

Línea de trabajo

Reproduce the server cross-compilation failure with cargo-zigbuild, then inspect the async trait declarations in crates/middleware/src/logseq.rs, crates/middleware/src/ripgrep.rs, and crates/middleware/src/lib.rs. The work is done when the cross-compilation completes without the E0706 errors shown in the report.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Compiling using https://hub.docker.com/r/messense/cargo-zigbuild fails with

error[E0706]: functions in traits cannot be declared `async`
  --> crates/middleware/src/logseq.rs:36:5
   |
36 |     async fn build_knowledge_graph(&self, resource: impl Read) -> Result<Thesaurus>;
   |     -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     `async` because of this
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0706]: functions in traits cannot be declared `async`
  --> crates/middleware/src/logseq.rs:45:5
   |
45 |       async fn index(
   |       ^----
   |       |
   |  _____`async` because of this
   | |
46 | |         &mut self,
47 | |         needle: String,
48 | |         haystack: String,
49 | |     ) -> Result<AHashMap<String, Article>> {
   | |__________________________________________^
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0706]: functions in traits cannot be declared `async`
  --> crates/middleware/src/ripgrep.rs:37:5
   |
37 |       async fn index(
   |       ^----
   |       |
   |  _____`async` because of this
   | |
38 | |         &mut self,
39 | |         needle: String,
40 | |         haystack: String,
41 | |     ) -> Result<AHashMap<String, Article>> {
   | |__________________________________________^
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0706]: functions in traits cannot be declared `async`
   --> crates/middleware/src/lib.rs:145:5
    |
145 |       async fn index(
    |       ^----
    |       |
    |  _____`async` because of this
    | |
146 | |         &mut self,
147 | |         needle: String,
148 | |         haystack: String,
149 | |     ) -> Result<AHashMap<String, Article>>;
    | |___________________________________________^
    |
    = note: `async` trait functions are not currently supported
    = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

For more information about this error, try `rustc --explain E0706`.
error: could not compile `terraphim_middleware` (lib) due to 4 previous errors

Lenguaje dominante
Rust
Estrellas
62
Forks
5
Merge medio
2 h 27 min
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de terraphim/terraphim-ai

Todos los issues de terraphim/terraphim-ai

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.