1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
Copyright © 2023, ParallelChain Lab
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
//! `pchain_compile` is a library to build ParallelChain Smart Contract that can be deployed to
//! ParallelChain Mainnet. It takes a ParallelChain Smart Contract written in Rust and builds by
//! Cargo in a docker environment.
//!
//! # Example
//! ```no_run
//! let source_path = Path::new("/home/user/contract").to_path_buf();
//! let result = pchain_compile::build_target(source_path, None).await;
//! ```
//!
//! # Example - Run from a configuration
//! ```no_run
//! let result = pchain_compile::Config {
//! source_path: Path::new("/home/user/contract").to_path_buf(),
//! docker_option: pchain_compile::DockerOption::Dockerless,
//! ..Default::default()
//! }
//! .run()
//! .await;
//! ```
pub
pub use *;
pub
pub
pub use build_target;