martinzink commented on code in PR #2186: URL: https://github.com/apache/nifi-minifi-cpp/pull/2186#discussion_r3636600404
########## minifi_rust/minifi_native/src/lib.rs: ########## @@ -0,0 +1,135 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +mod api; +pub mod c_ffi; +pub mod mock; + +pub use api::errors::MinifiError; + +pub use api::component_definition_traits::{ + ComponentIdentifier, ControllerServiceDefinition, ProcessorDefinition, +}; +pub use api::controller_service::{ControllerService, EnableControllerService}; +pub use api::processor_wrappers::complex_processor::{ComplexProcessorType, MutTrigger, Trigger}; +pub use api::processor_wrappers::flow_file_source::{ + FlowFileSource, FlowFileSourceProcessorType, GeneratedFlowFile, +}; +pub use api::processor_wrappers::flow_file_stream_transform::{ + FlowFileStreamTransform, FlowFileStreamTransformProcessorType, MutFlowFileStreamTransform, + TransformStreamResult, +}; +pub use api::processor_wrappers::flow_file_transform::{ + FlowFileTransform, FlowFileTransformProcessorType, TransformedFlowFile, +}; + +pub use api::processor_wrappers::utils::flow_file_content::Content; + +pub use api::processor::{Processor, Schedule}; + +pub use api::raw_processor::{MultiThreaded, SingleThreaded}; + +pub use api::logger::{LogLevel, Logger}; + +pub use api::property::{GetControllerService, GetProperty, Property}; + +pub use api::provided_interface::{ControllerServiceApi, ProvidedInterface}; + +pub use api::process_session::IoState; + +pub use api::attribute::{GetAttribute, OutputAttribute}; + +pub use api::{ + FlowFile, GetId, InputStream, OnTriggerResult, OutputStream, ProcessContext, ProcessSession, + ProcessorInputRequirement, Relationship, StandardPropertyValidator, +}; + +pub use minifi_native_macros as macros; +pub use minifi_native_sys as sys; +pub use mock::{ + MockControllerServiceContext, MockFlowFile, MockLogger, MockProcessContext, MockProcessSession, + StdLogger, +}; + +#[unsafe(no_mangle)] +#[allow(non_upper_case_globals)] +#[cfg_attr(target_os = "linux", unsafe(link_section = ".rodata"))] +#[cfg_attr(target_os = "macos", unsafe(link_section = "__DATA,__const"))] +#[cfg_attr(target_os = "windows", unsafe(link_section = ".rdata"))] +pub static minifi_api_version: u32 = minifi_native_sys::MINIFI_API_VERSION; Review Comment: no afaik u only need extern c for fns and this also cant be const because all const are inlined and we need this to export -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
