Rename directory hhbc to hackc
[hiphop-php.git] / hphp / hack / src / hackc / options_ffi / options_ffi.rs
blobaa2212bd91cc6f188a26ab6d918ca7f7aaf7f662
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 //
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
6 use ocamlrep_ocamlpool::ocaml_ffi;
7 use options::Options;
9 ocaml_ffi! {
10     fn configs_to_json_ffi(
11         jsons: Vec<compile_ffi::OcamlStr<'_>>,
12         cli_args: Vec<compile_ffi::OcamlStr<'_>>,
13     ) -> String {
14         let jsons: Vec<_> = jsons.into_iter().rev().collect();
15         Options::from_configs(&jsons, &cli_args)
16             .expect("bug in deserializing Hhbc_options from Rust")
17             .to_string()
18     }