| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| use {anyhow::Error, fuchsia_component::server::MissingStartupHandle, fuchsia_runtime::HandleType}; |
| |
| mod component; |
| |
| #[fuchsia::main] |
| async fn main() -> Result<(), Error> { |
| component::Component::new() |
| .run( |
| fuchsia_runtime::take_startup_handle(HandleType::DirectoryRequest.into()) |
| .ok_or(MissingStartupHandle)? |
| .into(), |
| fuchsia_runtime::take_startup_handle(HandleType::Lifecycle.into()).map(|h| h.into()), |
| ) |
| .await |
| } |