首页 > 解决方案 > 无法在提交 43a74718 处编译 Servo crate:在 `webrender_api` 中找不到`Transaction`

问题描述

Cargo 在提交43a7471885acbb30bc3de1ac52a5a0e1392d79ce时无法编译伺服:

$ cargo build
Compiling webgpu v0.0.1 (https://github.com/servo/servo#43a74718)
error[E0433]: failed to resolve: could not find `Transaction` in `webrender_api`
   --> /home/vl/.cargo/git/checkouts/servo-12bfca331f128de3/43a7471/components/webgpu/lib.rs:770:54
    |
770 |                         let mut txn = webrender_api::Transaction::new();
    |                                                      ^^^^^^^^^^^ could not find `Transaction` in `webrender_api`

该项目是一个新项目,修改了 Cargo.toml 以包含一个依赖项:

[package]
name = "test"
version = "0.1.0"
authors = ["Vladislav Nepogodin <nepogodin.vlad@gmail.com>"]
edition = "2018"

[dependencies]
libservo = { git = "https://github.com/servo/servo", features = ["layout-2020"] }

我正在使用 Rustnightly-2021-03-12和 Cargo cargo 1.52.0-nightly (970bc67c3 2021-03-07)

编译器设置有什么问题吗?

标签: rustrust-cargo

解决方案


推荐阅读