Skip to main content

consortium_builder/
lib.rs

1// Copyright 2026 Ethan Wu
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// SPDX-License-Identifier: Apache-2.0
16
17mod compile;
18pub mod pipeline;
19pub mod progress;
20
21// Trait
22pub use compile::Compiler;
23pub use progress::{BuildReporter, BuildStep};
24
25// Deployment artifact rendering
26pub use compile::deploy::systemd::{
27    SystemdRestartPolicy, SystemdUnitConfig, render_unit as render_systemd_unit,
28    write_unit as write_systemd_unit,
29};
30
31// End-to-end pipeline
32pub use pipeline::{PipelineConfig, PipelineError, PipelinePlan, run as run_pipeline};
33
34// Compile-time environment-injection carriers
35pub use compile::env::{CortexMcuCore, DbgConfig, HmiConfig, SharedMemConfig};
36
37// Backward-compatible builders (String-error API)
38pub use compile::application::ApplicationBuilder;
39pub use compile::firmware::FirmwareBuilder;
40pub use compile::optee::{OpteeBuilder, OpteeEnvironment};
41
42// Typed compiler API
43pub use compile::application::{
44    ApplicationCompileError, ApplicationCompiler, ApplicationConfiguration,
45};
46pub use compile::firmware::{FirmwareCompileError, FirmwareCompiler, FirmwareConfiguration};
47pub use compile::optee::{OPTEE_TARGET, OpteeCompileError, OpteeCompiler, OpteeConfiguration};
48pub use compile::web::{HmiBuildCommand, HmiCompileError, HmiCompiler, HmiConfiguration};