Implement a Rust FFI for embedding bytecode generation in C++

Summary:
Bytecode generation entry point `compile_ffi::compile_from_text_cpp_ffi(...)` and a driver to exercise it:  `hh_single_compile_cpp`.

What we get here is a C FFI for generating HHAS from source text. We can tweak the interface as we need to going forward but this will do for a first version and I think has roughly feature parity with the OCaml FFI:
- `compile_ffi.rs` defines the function;
- `compile_ffi.h` defines the C interface;
- `hh_single_compile_cpp.cpp` provides a C++ CLI that calls the function.

Reviewed By: shiqicao

Differential Revision: D25979967

fbshipit-source-id: 4b46f9af23c61150dda6c33f9fa14e2c455c54c2
This commit is contained in:
Shayne Fletcher 2021-01-27 08:06:57 -08:00 committed by Facebook GitHub Bot
parent 5eedbf488b
commit 38db03ad7f

View File

@ -6,7 +6,7 @@ version = "0.1.0"
include = ["src/**/*.rs"]
[dependencies]
dag = { path = "../dag", features = ["for-tests"] }
dag = { path = "../dag", features = ["for-tests", "indexedlog-backend"] }
edenapi = { path = "../edenapi" }
gitdag = { path = "../dag/gitdag" }
metalog = { path = "../metalog" }