Crate pchain_compile
source ·Expand description
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
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
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;
Re-exports§
pub use build::build_target;
pub use config::*;
Modules§
- Implementation of contracts compilation.
- Configuration of pchain_compile. The struct
Config
specifies parameters being used, and provides a methodrun
that starts the compilation process. - Defines enum of Error Codes for exiting the processes.