@reuven thanks for your prompt action! That indeed helped with the first error, but I’m getting others:
Compiling cosmwasm-sgx-vm v0.9.0-alpha1 (https://github.com/enigmampc/SecretNetwork?tag=v0.5.0-alpha2#b1710787)
error[E0432]: unresolved import `crate::backends::get_gas_left`
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:20:5
|
20 | use crate::backends::get_gas_left;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `get_gas_left` in `backends`
error: cannot find macro `imports` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:94:13
|
94 | imports! { move || { setup_context::<S, Q>(gas_limit) }, "env" => {}, };
| ^^^^^^^
error: cannot find macro `imports` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:98:27
|
98 | import_obj.extend(imports! {
| ^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `VmError`
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:167:13
|
167 | VmError::instantiation_err(format!("Error instantiating module: {:?}", original))
| ^^^^^^^ use of undeclared type or module `VmError`
error[E0433]: failed to resolve: use of undeclared type or module `CommunicationError`
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:249:24
|
249 | return Err(CommunicationError::zero_address().into());
| ^^^^^^^^^^^^^^^^^^ use of undeclared type or module `CommunicationError`
error[E0412]: cannot find type `Func` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/calls.rs:161:23
|
161 | let func: Func<u32, u32> = instance.func(name)?;
| ^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
1 | use parity_wasm::elements::Func;
|
error[E0412]: cannot find type `Func` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/calls.rs:165:23
|
165 | let func: Func<(u32, u32), u32> = instance.func(name)?;
| ^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
1 | use parity_wasm::elements::Func;
|
error[E0412]: cannot find type `NonNull` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/context.rs:177:29
|
177 | wasmer_instance: Option<NonNull<WasmerInstance>>,
| ^^^^^^^ not found in this scope
|
help: possible candidates are found in other modules, you can import them into scope
|
6 | use core::ptr::NonNull;
|
6 | use std::ptr::NonNull;
|
error[E0412]: cannot find type `WasmerInstance` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/context.rs:177:37
|
175 | pub fn set_wasmer_instance<S: Storage, Q: Querier>(
| - help: you might be missing a type parameter: `, WasmerInstance`
176 | ctx: &mut Ctx,
177 | wasmer_instance: Option<NonNull<WasmerInstance>>,
| ^^^^^^^^^^^^^^ not found in this scope
error[E0405]: cannot find trait `WasmTypeList` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/context.rs:297:11
|
297 | Args: WasmTypeList,
| ^^^^^^^^^^^^ not found in this scope
error[E0405]: cannot find trait `WasmTypeList` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/context.rs:298:11
|
298 | Rets: WasmTypeList,
| ^^^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `Func` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/context.rs:299:22
|
299 | Callback: FnOnce(Func<Args, Rets, Wasm>) -> VmResult<CallbackData>,
| ^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
6 | use parity_wasm::elements::Func;
|
error[E0412]: cannot find type `Wasm` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/context.rs:299:39
|
299 | Callback: FnOnce(Func<Args, Rets, Wasm>) -> VmResult<CallbackData>,
| ^^^^ not found in this scope
|
help: there is an enum variant `cosmwasm_std::CosmosMsg::Wasm` and 1 other; try using the variant's enum
|
299 | Callback: FnOnce(Func<Args, Rets, cosmwasm_std::CosmosMsg>) -> VmResult<CallbackData>,
| ^^^^^^^^^^^^^^^^^^^^^^^
299 | Callback: FnOnce(Func<Args, Rets, cosmwasm_std::QueryRequest>) -> VmResult<CallbackData>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you might be missing a type parameter
|
289 | pub(crate) fn with_func_from_context<S, Q, Args, Rets, Callback, CallbackData, Wasm>(
| ^^^^^^
error[E0425]: cannot find function `get_memory_info` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:219:10
|
219 | (get_memory_info(self.inner.context()).size as u64) * WASM_PAGE_SIZE
| ^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `WASM_PAGE_SIZE` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:219:63
|
219 | (get_memory_info(self.inner.context()).size as u64) * WASM_PAGE_SIZE
| ^^^^^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `Func` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:246:20
|
246 | let alloc: Func<u32, u32> = self.func("allocate")?;
| ^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
4 | use parity_wasm::elements::Func;
|
error[E0425]: cannot find function `to_u32` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:247:30
|
247 | let ptr = alloc.call(to_u32(size)?)?;
| ^^^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
4 | use crate::conversion::to_u32;
|
error[E0412]: cannot find type `Func` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:259:22
|
259 | let dealloc: Func<u32, ()> = self.func("deallocate")?;
| ^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
4 | use parity_wasm::elements::Func;
|
error[E0425]: cannot find function `read_region` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:267:9
|
267 | read_region(self.inner.context(), region_ptr, max_length)
| ^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find function `write_region` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:273:9
|
273 | write_region(self.inner.context(), region_ptr, data)?;
| ^^^^^^^^^^^^ not found in this scope
error[E0405]: cannot find trait `WasmTypeList` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:280:15
|
280 | Args: WasmTypeList,
| ^^^^^^^^^^^^ not found in this scope
error[E0405]: cannot find trait `WasmTypeList` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:281:15
|
281 | Rets: WasmTypeList,
| ^^^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `Func` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:278:67
|
278 | pub(crate) fn func<Args, Rets>(&self, name: &str) -> VmResult<Func<Args, Rets, Wasm>>
| ^^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
4 | use parity_wasm::elements::Func;
|
error[E0412]: cannot find type `Wasm` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/instance.rs:278:84
|
278 | pub(crate) fn func<Args, Rets>(&self, name: &str) -> VmResult<Func<Args, Rets, Wasm>>
| ^^^^ not found in this scope
|
help: there is an enum variant `cosmwasm_std::CosmosMsg::Wasm` and 1 other; try using the variant's enum
|
278 | pub(crate) fn func<Args, Rets>(&self, name: &str) -> VmResult<Func<Args, Rets, cosmwasm_std::CosmosMsg>>
| ^^^^^^^^^^^^^^^^^^^^^^^
278 | pub(crate) fn func<Args, Rets>(&self, name: &str) -> VmResult<Func<Args, Rets, cosmwasm_std::QueryRequest>>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you might be missing a type parameter
|
64 | impl<S, A, Q, Wasm> Instance<S, A, Q>
| ^^^^^^
error[E0405]: cannot find trait `Storage` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/testing/instance.rs:134:19
|
134 | pub fn test_io<S: Storage + 'static, A: Api + 'static, Q: Querier + 'static>(
| ^^^^^^^ not found in this scope
|
help: possible candidates are found in other modules, you can import them into scope
|
4 | use cosmwasm_std::Storage;
|
4 | use crate::traits::Storage;
|
error[E0405]: cannot find trait `Api` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/testing/instance.rs:134:41
|
134 | pub fn test_io<S: Storage + 'static, A: Api + 'static, Q: Querier + 'static>(
| ^^^ not found in this scope
|
help: possible candidates are found in other modules, you can import them into scope
|
4 | use cosmwasm_std::Api;
|
4 | use crate::traits::Api;
|
error[E0405]: cannot find trait `Querier` in this scope
--> /home/p1/.cargo/git/checkouts/secretnetwork-2885a5c51d1243af/b171078/cosmwasm/packages/sgx-vm/src/testing/instance.rs:134:59
|
134 | pub fn test_io<S: Storage + 'static, A: Api + 'static, Q: Querier + 'static>(
| ^^^^^^^ not found in this scope
|
help: possible candidates are found in other modules, you can import them into scope
|
4 | use cosmwasm_std::Querier;
|
4 | use crate::traits::Querier;
|
error: aborting due to 27 previous errors
Some errors have detailed explanations: E0405, E0412, E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `cosmwasm-sgx-vm`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed