mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
try compiling with different methods, no success
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
use codec::Encode;
|
||||
use subxt::client::OfflineClientT;
|
||||
use subxt::config::{Config, ExtrinsicParams, ExtrinsicParamsEncoder};
|
||||
use subxt_core::error::ExtrinsicParamsError;
|
||||
use subxt_core::ExtrinsicParamsError;
|
||||
use subxt_signer::sr25519::dev;
|
||||
|
||||
#[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")]
|
||||
|
||||
@@ -7,7 +7,7 @@ use subxt::config::{
|
||||
Config, DefaultExtrinsicParamsBuilder, ExtrinsicParams, ExtrinsicParamsEncoder,
|
||||
};
|
||||
use subxt_core::config::signed_extensions;
|
||||
use subxt_core::error::ExtrinsicParamsError;
|
||||
use subxt_core::ExtrinsicParamsError;
|
||||
use subxt_signer::sr25519::dev;
|
||||
|
||||
#[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_small.scale")]
|
||||
|
||||
Generated
+4
-4
@@ -167,9 +167,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "curve25519-dalek"
|
||||
version = "4.1.1"
|
||||
version = "4.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c"
|
||||
checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
@@ -277,9 +277,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
|
||||
[[package]]
|
||||
name = "fiat-crypto"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
|
||||
checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382"
|
||||
|
||||
[[package]]
|
||||
name = "fixed-hash"
|
||||
|
||||
@@ -7,8 +7,8 @@ resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
subxt-metadata = { path = "../../metadata", default-features = false }
|
||||
subxt-core = { path = "../../core", default-features = false }
|
||||
subxt-signer = { path = "../../signer", default-features = false, features = ["sr25519", "ecdsa", "subxt"] }
|
||||
subxt-core = { path = "../../core", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] }
|
||||
libc = { version = "0.2", default-features = false }
|
||||
libc_alloc = { version = "1.0.6" }
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# no_std tests
|
||||
|
||||
This crate makes sure some of the subxt-* crates work in a no-std environment.
|
||||
|
||||
We would like it to run in a no-std environment. You can try any of the following to get it to compile:
|
||||
```
|
||||
cargo run
|
||||
cargo build --target thumbv7em-none-eabi
|
||||
cargo build --target aarch64-unknown-none
|
||||
```
|
||||
Currently it does not compile due to linker errors and I have no idea how to resovle these.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#[start]
|
||||
fn start(_argc: isize, _argv: *const *const u8) -> isize {
|
||||
compile_test();
|
||||
test();
|
||||
0
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ pub extern "C" fn rust_eh_personality() {}
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
unsafe {
|
||||
libc::abort();
|
||||
}
|
||||
}
|
||||
|
||||
use libc_alloc::LibcAlloc;
|
||||
@@ -33,27 +35,30 @@ extern crate alloc;
|
||||
|
||||
/// Including code here makes sure it is not pruned.
|
||||
/// We want all code included to compile fine for the `thumbv7em-none-eabi` target.
|
||||
fn compile_test() {
|
||||
subxt_metadata_compiles();
|
||||
}
|
||||
fn test() {
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// subxt-metadata
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fn subxt_metadata_compiles() {
|
||||
use codec::Decode;
|
||||
let bytes: alloc::vec::Vec<u8> = alloc::vec![0, 1, 2, 3, 4];
|
||||
subxt_metadata::Metadata::decode(&mut &bytes[..]).expect_err("invalid byte sequence");
|
||||
|
||||
const METADATA: &[u8] = include_bytes!("../../../artifacts/polkadot_metadata_small.scale");
|
||||
subxt_metadata::Metadata::decode(&mut &METADATA[..]).expect("should be valid metadata");
|
||||
}
|
||||
|
||||
fn subxt_signer_test() {
|
||||
use subxt_signer::{ SecretUri, ecdsa::Keypair };
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// subxt-signer
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
use core::str::FromStr;
|
||||
use subxt_signer::{ecdsa::Keypair, SecretUri};
|
||||
let uri = SecretUri::from_str("//Alice").unwrap();
|
||||
let keypair = Keypair::from_uri(&uri).unwrap();
|
||||
}
|
||||
let _keypair = Keypair::from_uri(&uri).unwrap();
|
||||
|
||||
fn subxt_core_test() {
|
||||
let _ = subxt_core::utils::Era::Immortal;
|
||||
}
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// subxt-core
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
let _era = subxt_core::utils::Era::Immortal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user