Port Hhi module to Rustnightly-2021.07.25
commit0998e6938250cbb0ac5f97214d006c0df8d67b06
authorJake Bailey (Hacklang) <[email protected]>
Sat, 24 Jul 2021 18:51:16 +0000 (24 11:51 -0700)
committerFacebook GitHub Bot <[email protected]>
Sat, 24 Jul 2021 18:53:17 +0000 (24 11:53 -0700)
treea440ecff9a31e68a20903f6f4f88ca71301dd06b
parentf00759dc64700629133e2d67d8a6962c88dc8ed3
Port Hhi module to Rust

Summary:
Port [the module which writes hhi files to disk](https://www.internalfb.com/code/fbsource/%5B374c32eb2dd3%5D/fbcode/hphp/hack/src/hhi/hhi.ml) to Rust, so that the decl service can write them to a tmpdir on startup instead of having the worker-prototype process do so.

The Hhi module uses [a ppx transform](https://www.internalfb.com/code/fbsource/%5B374c32eb2dd3%5D/fbcode/hphp/hack/src/ppx/ppx_gen_hhi_common.ml?lines=94) to embed the contents of the hhi files [directly into the source of the Hhi module](https://www.internalfb.com/code/fbsource/%5B374c32eb2dd3%5D/fbcode/hphp/hack/src/hhi/hhi.ml?lines=13). I've done the same thing here by writing a Buck custom rule which generates a Rust file containing the hhi contents as a static const.

Reviewed By: bobrenjc93

Differential Revision: D29889674

fbshipit-source-id: ad31fc4ea325c339b41dad4bdfa1d97d77922a1d
hphp/hack/src/hhi/rust/Cargo.toml [new file with mode: 0644]
hphp/hack/src/hhi/rust/gen_hhi_contents.rs [new file with mode: 0644]
hphp/hack/src/hhi/rust/hhi.rs [new file with mode: 0644]