File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #![ cfg( not( any( target_arch = "riscv64" , target_arch = "s390x" ) ) ) ]
2+
13//! # Wasmtime's [wasi-tls] (Transport Layer Security) Implementation
24//!
35//! This crate provides the Wasmtime host implementation for the [wasi-tls] API.
6062//! })?;
6163//!
6264//! // ... use `linker` to instantiate within `store` ...
63- //!
6465//! Ok(())
6566//! }
6667//!
Original file line number Diff line number Diff line change 1+ #![ cfg( not( any( target_arch = "riscv64" , target_arch = "s390x" ) ) ) ]
2+
13use anyhow:: { anyhow, Result } ;
24use test_programs_artifacts:: { foreach_tls, TLS_SAMPLE_APPLICATION_COMPONENT } ;
35use wasmtime:: {
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ use wasmtime_wasi_http::{
3232#[ cfg( feature = "wasi-keyvalue" ) ]
3333use wasmtime_wasi_keyvalue:: { WasiKeyValue , WasiKeyValueCtx , WasiKeyValueCtxBuilder } ;
3434
35- #[ cfg( feature = "wasi-tls" ) ]
35+ #[ cfg( all(
36+ feature = "wasi-tls" ,
37+ not( any( target_arch = "riscv64" , target_arch = "s390x" ) )
38+ ) ) ]
3639use wasmtime_wasi_tls:: WasiTlsCtx ;
3740
3841fn parse_preloads ( s : & str ) -> Result < ( String , PathBuf ) > {
@@ -829,11 +832,22 @@ impl RunCommand {
829832 }
830833
831834 if self . run . common . wasi . tls == Some ( true ) {
832- #[ cfg( not( all( feature = "wasi-tls" , feature = "component-model" ) ) ) ]
835+ #[ cfg( any( target_arch = "riscv64" , target_arch = "s390x" ) ) ]
836+ {
837+ bail ! ( "Unsupported architecture for wasi-tls" ) ;
838+ }
839+ #[ cfg( all(
840+ not( any( target_arch = "riscv64" , target_arch = "s390x" ) ) ,
841+ not( all( feature = "wasi-tls" , feature = "component-model" ) )
842+ ) ) ]
833843 {
834844 bail ! ( "Cannot enable wasi-tls when the binary is not compiled with this feature." ) ;
835845 }
836- #[ cfg( all( feature = "wasi-tls" , feature = "component-model" ) ) ]
846+ #[ cfg( all(
847+ feature = "wasi-tls" ,
848+ feature = "component-model" ,
849+ not( any( target_arch = "riscv64" , target_arch = "s390x" ) )
850+ ) ) ]
837851 {
838852 match linker {
839853 CliLinker :: Core ( _) => {
You can’t perform that action at this time.
0 commit comments