Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross compilation of server fails with async_trait #56

Open
AlexMikhalev opened this issue Mar 14, 2024 · 1 comment
Open

Cross compilation of server fails with async_trait #56

AlexMikhalev opened this issue Mar 14, 2024 · 1 comment

Comments

@AlexMikhalev
Copy link
Contributor

AlexMikhalev commented Mar 14, 2024

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

@AlexMikhalev
Copy link
Contributor Author

Cross compilation on mac os using Earthfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant