rename feature

This commit is contained in:
vms 2020-08-23 03:18:24 +03:00
parent 03042d4568
commit 73b34b7e63
7 changed files with 8 additions and 11 deletions

View File

@ -21,4 +21,4 @@ fluence-sdk-wit = { path = "../wit", version = "=0.2.0" }
[features] [features]
# Indicates that this crate is included to the Fluence Rust sdk (it affects internal path adjusting) # Indicates that this crate is included to the Fluence Rust sdk (it affects internal path adjusting)
fce = ["fluence-sdk-wit/fce"] used_in_sdk = ["fluence-sdk-wit/used_in_sdk"]

View File

@ -19,7 +19,7 @@ crate-type = ["rlib"]
[dependencies] [dependencies]
log = { version = "0.4.8", features = ["std"] } log = { version = "0.4.8", features = ["std"] }
fluence-sdk-macro = { path = "../macro", features = ["fce"] } fluence-sdk-macro = { path = "../macro", features = ["used_in_sdk"] }
serde = "1.0.115" serde = "1.0.115"
[dev-dependencies] [dev-dependencies]
@ -32,6 +32,3 @@ debug = []
# Enable logger (this will cause log_utf8_string to appear in imports) # Enable logger (this will cause log_utf8_string to appear in imports)
logger = [] logger = []
# Indicates that this crate is included to the Fluence Rust sdk (it affects internal path adjusting)
fce = ["fluence-sdk-macro/fce"]

View File

@ -37,7 +37,7 @@ impl CallParameters {
} }
} }
#[cfg(not(feature = "fce"))] #[cfg(not(feature = "used_in_sdk"))]
#[fce] #[fce]
#[link(wasm_import_module = "host")] #[link(wasm_import_module = "host")]
#[allow(improper_ctypes)] #[allow(improper_ctypes)]

View File

@ -38,7 +38,7 @@ mod logger;
mod result; mod result;
pub use call_parameters::CallParameters; pub use call_parameters::CallParameters;
#[cfg(not(feature = "fce"))] #[cfg(not(feature = "used_in_sdk"))]
pub use call_parameters::get_call_parameters; pub use call_parameters::get_call_parameters;
pub use export_allocator::allocate; pub use export_allocator::allocate;
pub use export_allocator::deallocate; pub use export_allocator::deallocate;

View File

@ -23,4 +23,4 @@ uuid = { version = "0.8.1", features = ["v4"] }
[features] [features]
# Indicates that this crate is included to the Fluence Rust sdk (it affects internal path adjusting) # Indicates that this crate is included to the Fluence Rust sdk (it affects internal path adjusting)
fce = [] used_in_sdk = []

View File

@ -73,12 +73,12 @@ impl ForeignModEpilogGlueCodeGenerator for Option<ParsedType> {
} }
} }
#[cfg(not(feature = "fce"))] #[cfg(not(feature = "used_in_sdk"))]
fn get_crate_path() -> proc_macro2::TokenStream { fn get_crate_path() -> proc_macro2::TokenStream {
quote! { fluence::internal } quote! { fluence::internal }
} }
#[cfg(feature = "fce")] #[cfg(feature = "used_in_sdk")]
fn get_crate_path() -> proc_macro2::TokenStream { fn get_crate_path() -> proc_macro2::TokenStream {
quote! { crate } quote! { crate }
} }

View File

@ -43,7 +43,7 @@ impl quote::ToTokens for fce_ast_types::AstRecordItem {
let glue_code = quote::quote! { let glue_code = quote::quote! {
#original #original
#[cfg(any(target_arch = "wasm32", feature = "fce"))] #[cfg(any(target_arch = "wasm32", feature = "used_in_sdk"))]
#[doc(hidden)] #[doc(hidden)]
#[allow(clippy::all)] #[allow(clippy::all)]
impl #record_name { impl #record_name {