Using just `nightly` is too generic and can fail on different systems.
Now its fixed to the nightly version of the CI.
Another way would be to use a toolchain file, since this already assumes
`rustup`.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
In case `CARGO_TARGET_DIR` is set, build artifacts were in the wrong
place and `build.rs` was failing. With
`CARGO_TARGET_DIR=/home/nazar-pc/.cache/cargo/target`:
```
error: failed to run custom build command for `pallet-contracts-fixtures v1.0.0 (/web/subspace/polkadot-sdk/substrate/frame/contracts/fixtures)`
Caused by:
process didn't exit successfully: `/home/nazar-pc/.cache/cargo/target/debug/build/pallet-contracts-fixtures-35d534f7ac3009e0/build-script-build` (exit status: 1)
--- stderr
Error: Failed to read "/tmp/.tmpiYwXfv/target/wasm32-unknown-unknown/release/dummy.wasm"
Caused by:
Can't read from the file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
```
The file was actually in
`/home/nazar-pc/.cache/cargo/target/wasm32-unknown-unknown/release/dummy.wasm`.
This disables building the RISCV fixtures by default. They still require
a custom build rustc version. When there are actual tests for RISCV, the
feature can be enabled in CI. Also fixes some unwraps that assume again
that people are using rustup...
The build script was assuming that `rustup` is installed, which breaks
the build on systems that do not use `rustup`. This pull request just
fixes it by not panicking on the call to `rustup`.
see #2189
This PR does the following:
- Bring the user api functions into a new pallet-contracts-uapi (They
are currently defined in ink!
[here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs)
- Add older api versions and unstable to the user api trait.
- Remove pallet-contracts-primitives and bring the types it defined in
uapi / pallet-contracts
- Add the infrastructure to build fixtures from Rust files and test it
works by replacing `dummy.wat` and `call.wat`
- Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.
This will be done in a follow up:
- convert the rest of the test from .wat to rust
- bring risc-v uapi up to date with wasm
- finalize the uapi host fns, making sure everything is codegen from the
source host fns in pallet-contracts
---------
Co-authored-by: Alexander Theißen <alex.theissen@me.com>