marine_macro_impl/
lib.rs

1/*
2 * Copyright 2020 Fluence Labs Limited
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#![doc(html_root_url = "https://docs.rs/marine-macro-impl/0.14.0")] // x-release-please-version
18#![deny(
19    dead_code,
20    nonstandard_style,
21    unused_imports,
22    unused_mut,
23    unused_variables,
24    unused_unsafe,
25    unreachable_patterns
26)]
27#![recursion_limit = "1024"]
28#![warn(rust_2018_idioms)]
29
30/// This crate contains functions and types to support work with WebAssembly interface-types
31/// in Fluence.
32
33mod ast_types;
34mod export_ast_types;
35mod marine_macro_impl;
36mod parsed_type;
37mod parse_macro_input;
38mod token_stream_generator;
39mod utils;
40mod wasm_type;
41
42pub use export_ast_types::*;
43pub use crate::marine_macro_impl::marine;
44pub use parsed_type::ParsedType;
45pub use parsed_type::PassingStyle;
46pub use token_stream_generator::GENERATED_WRAPPER_FUNC_PREFIX;
47pub use token_stream_generator::GENERATED_SECTION_PREFIX;
48pub use token_stream_generator::GENERATED_GLOBAL_PREFIX;
49pub use wasm_type::RustType;
50
51pub const GENERATED_SECTION_PREFIX_FCE: &str = "__fce_generated_section__";
52pub const MARINE_HOST_API_NAMESPACE_PREFIX: &str = "__marine_host_api_v";
53pub const MARINE_HOST_API_VERSION: u32 = 1;