Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reindeer import neon library for Rust/Node FFI
Summary: For VS Code, we are going to be writing native code in rust that needs to be exposed to NodeJS. The Neon library (https://github.com/neon-bindings/neon) supports the FFI boundary requirements necessary to accomplish this. --- Update cargo.toml to import external package neon v1.0.0 for Rust->Node FFI work. Instructions from here: https://www.internalfb.com/wiki/Rust/Third_Party_Libraries/Adding_or_Updating_Libraries Modify rust.toml and run: ``` ./fbcode/common/rust/tools/reindeer/vendor ``` Note that neon requires a newer version of semver, so this diff also updates that version from 1.0.17 to 1.0.23 Following the fixups instructions: https://www.internalfb.com/wiki/Rust/Third_Party_Libraries/Fixups, I added one for the env!() code in meta.rs due to this message from ```fbcode/common/rust/tools/scripts/third-party-check.sh``` ``` Action failed: fbsource//third-party/rust:neon-1.0.0 (rustc check) Remote command returned non-zero exit code 1 Reproduce locally: `frecli cas download-action 51770a2ed06955702573d8f9a28e85abc9cd77cb443c4ef69cdbb506fe96d2f5:145` stdout: stderr: error: environment variable `CARGO_PKG_VERSION` not defined at compile time --> third-party/rust/vendor/neon-1.0.0/src/meta.rs:6:27 | 6 | pub const VERSION: &str = env!("CARGO_PKG_VERSION"); | ^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation --> xplat/rust/toolchain/sysroot/1.81.0/library/core/src/macros/mod.rs:1083:5 | = note: in this expansion of `env!` | = help: Cargo sets build script variables at run time. Use `std::env::var("CARGO_PKG_VERSION")` instead ``` Reviewed By: davidbarsky, cfsmp3 Differential Revision: D65178280 fbshipit-source-id: 3742c3f42e67cf841159dd8165d19ed95fb60868
- Loading branch information