-
Notifications
You must be signed in to change notification settings - Fork 702
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
kv_table_test运行错误 #4464
Comments
你用的工具链版本是多少? |
rustc 1.68.0-nightly (d6f99e535 2023-01-02) |
工具链有点老了,用这个nightly-2024-02-25试试 |
试了一下,确实可以,上面的报错成功解决了,但是build的时候还是会报错,如下,请问是什么原因 Caused by: |
@Ka7rina 这个是rust工具链生成了wasm的mvp版本范围之外的opcode,你尝试使用下面的命令安装下修改后的cargo-liquid和新一点的wasm-opt工具,然后再编译试试 cargo install --git https://github.com/bxq2011hust/cargo-liquid --branch main --force
cargo install wasm-opt |
报错
`error: custom attribute panicked
--> src/lib.rs:14:1
|
14 | #[liquid::interface(name = auto)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: both spans are in the same file AND we are using nightly Rust
error: custom attribute panicked
--> src/lib.rs:28:1
|
28 | #[liquid::interface(name = auto)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: both spans are in the same file AND we are using nightly Rust
error[E0432]: unresolved imports
super::kv_table
,super::table_manager
--> src/lib.rs:39:17
|
39 | use super::{kv_table::, table_manager::, *};
| ^^^^^^^^ ^^^^^^^^^^^^^ could not find
table_manager
in the crate root| |
| could not find
kv_table
in the crate rooterror[E0412]: cannot find type
KvTable
in this scope--> src/lib.rs:43:31
|
41 | #[liquid(storage)]
| - help: you might be missing a type parameter:
<KvTable>
42 | struct KvTableTest {
43 | table: storage::Value,
| ^^^^^^^ not found in this scope
error[E0412]: cannot find type
TableManager
in this scope--> src/lib.rs:44:28
|
41 | #[liquid(storage)]
| - help: you might be missing a type parameter:
<TableManager>
...
44 | tm: storage::Value,
| ^^^^^^^^^^^^ not found in this scope
error[E0433]: failed to resolve: use of undeclared type
TableManager
--> src/lib.rs:58:29
|
58 | ... .initialize(TableManager::at("/sys/table_manager".parse().unwrap()));
| ^^^^^^^^^^^^ use of undeclared type
TableManager
error[E0433]: failed to resolve: use of undeclared type
KvTable
--> src/lib.rs:65:29
|
65 | ... .initialize(KvTable::at("/tables/t_kv_test".parse().unwrap()));
| ^^^^^^^ use of undeclared type
KvTable
Some errors have detailed explanations: E0412, E0432, E0433.
For more information about an error, try
rustc --explain E0412
.error: could not compile
test
due to 7 previous errorswarning: build failed, waiting for other jobs to finish...
error: could not compile
test
due to 7 previous errors`
The text was updated successfully, but these errors were encountered: