language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
OCaml Interface | hhvm/hphp/hack/src/utils/core/prim_defs.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
**
*
* "Primitive" definitions; fighting the dependency web, this module is a leaf
* on the dependency tree. It may o... |
OCaml | hhvm/hphp/hack/src/utils/core/random_id.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
let initialized = ref false
(* Do not use / in random ids as they appear in filenames. *)
let alphanumeric_alphabet... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/random_id.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Generates a short string with alphanumeric alphabet *)
val short_string : unit -> string |
OCaml | hhvm/hphp/hack/src/utils/core/stats.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Not all stats are worth logging for every user. Things like the initial heap
* size are pretty deterministic if ... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/stats.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
OCaml | hhvm/hphp/hack/src/utils/core/telemetry.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type key_value_pair = string * Hh_json.json [@@deriving show]
(** This list is in reverse order (i.e. most r... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/telemetry.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t [@@deriving show]
val create : unit -> t
val to_string : ?pretty:bool -> t -> string
val to_json : t -> Hh_json.json... |
OCaml | hhvm/hphp/hack/src/utils/core/utils.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
module Printexc = Stdlib.Printexc
(** Callstack is simply a typed way to indicate that a string is ... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/utils.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
Rust | hhvm/hphp/hack/src/utils/core/utils.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::borrow::Cow;
/**
* A\B\C -> \A\B\C
*/
pub fn add_ns(s: &str) -> Cow<'_, str> {
if !s.starts_with('\\') {
let mut... |
OCaml | hhvm/hphp/hack/src/utils/core/approx_set/approxSet.ml | (*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module Set_relation = struct
type t =
| Equal
| Subset
| Superset
| Disjoint
| Unknown
end
module typ... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/approx_set/approxSet.mli | (*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** The relationship between atomic elements in the set *)
module Set_relation : sig
type t =
| Equal
| Subset
... |
OCaml | hhvm/hphp/hack/src/utils/core/bloom_filter/bloomFilter.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module BitSet = struct
type t = bytes
type idx = {
bit_idx: int;
byte_idx: int;
}
let zero = Char.unsafe_chr... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/bloom_filter/bloomFilter.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* A Bloom Filter is a probablistic data structure representing a set.
* Elements can be added to the set and supports me... |
hhvm/hphp/hack/src/utils/core/config/dune | (rule
(targets build-timestamp-opt)
(action
(with-stdout-to
build-timestamp-opt
(bash "echo -DHH_BUILD_TIMESTAMP=$(date +%s)ul")))) | |
OCaml | hhvm/hphp/hack/src/utils/disk/disk.ml | include
(val if Injector_config.use_test_stubbing then
(module TestDisk : Disk_sig.S)
else
(module RealDisk : Disk_sig.S)) |
OCaml | hhvm/hphp/hack/src/utils/disk/disk_sig.ml | module Types = struct
exception NotADirectory of string
exception No_such_file_or_directory of string
exception Rename_target_already_exists of string
exception Rename_target_dir_not_empty of string
end
module type S = sig
include module type of Types
val cat : string -> string
val write_file : file... |
OCaml | hhvm/hphp/hack/src/utils/disk/realDisk.ml | include Disk_sig.Types
let cat (filename : string) : string =
Counters.count Counters.Category.Disk_cat @@ fun () ->
let ic = open_in_bin filename in
let len =
try in_channel_length ic with
| Sys_error _ -> 0
in
(* in_channel_length returns 0 for non-regular files; try reading it
using a fixed-s... |
OCaml | hhvm/hphp/hack/src/utils/disk/testDisk.ml | include Disk_sig.Types
module Hashtbl_base = Hashtbl
module Hashtbl = struct
include Hashtbl_base
let empty t = length t = 0
end
type file =
| Actual_file_with_contents of string
| Directory of (string, file) Hashtbl.t
module Helpers = struct
exception Relative_parent_not_supported
exception Is_not_act... |
TOML | hhvm/hphp/hack/src/utils/eq_modulo_pos/Cargo.toml | # @generated by autocargo
[package]
name = "eq_modulo_pos"
version = "0.0.0"
edition = "2021"
[lib]
path = "eq_modulo_pos.rs"
[dependencies]
arena_collections = { version = "0.0.0", path = "../../arena_collections" }
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
eq_modulo_pos_derive = { versio... |
Rust | hhvm/hphp/hack/src/utils/eq_modulo_pos/eq_modulo_pos.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::rc::Rc;
use std::sync::Arc;
pub use eq_modulo_pos_derive::EqModuloPos;
use ocamlrep_caml_builtins::Int64;
/// An implementati... |
TOML | hhvm/hphp/hack/src/utils/eq_modulo_pos_derive/Cargo.toml | # @generated by autocargo
[package]
name = "eq_modulo_pos_derive"
version = "0.0.0"
edition = "2021"
[lib]
path = "eq_modulo_pos_derive.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29"
synstructure = "0.12" |
Rust | hhvm/hphp/hack/src/utils/eq_modulo_pos_derive/eq_modulo_pos_derive.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use proc_macro2::TokenStream;
use quote::quote;
use synstructure::decl_derive;
use synstructure::Structure;
decl_derive!([EqModuloPos] ... |
TOML | hhvm/hphp/hack/src/utils/escaper/Cargo.toml | # @generated by autocargo
[package]
name = "escaper"
version = "0.0.0"
edition = "2021"
[lib]
path = "../escaper.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
bumpalo = { version = "3.11.1", features = ["collections"] }
[dev-dependencies]
pretty_assertions = { version = "1.... |
hhvm/hphp/hack/src/utils/exec_command/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
hhvm/hphp/hack/src/utils/fetcher/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
TOML | hhvm/hphp/hack/src/utils/ffi/Cargo.toml | # @generated by autocargo
[package]
name = "ffi"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
bumpalo = { version = "3.11.1", features = ["collections"] }
serde = { version = "1.0.176", features = ["derive", "rc"] }
write... |
Rust | hhvm/hphp/hack/src/utils/ffi/ffi.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::cmp::Ordering;
use std::fmt;
use std::hash::Hash;
use std::hash::Hasher;
use std::slice::from_raw_parts;
use bstr::BStr;
use s... |
C/C++ | hhvm/hphp/hack/src/utils/ffi/ffi_extra.h | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#pragma once
// Forward declare bumpalo::Bump
struct Bump; |
Rust | hhvm/hphp/hack/src/utils/ffi/ffi_ffi_cbindgen.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
/// This definition exists for ffi_cbindgen C++ header generation. Any
/// attempt to call this function will result in an intentional
/... |
Rust | hhvm/hphp/hack/src/utils/ffi/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
//! There are basically two kinds of types can't be made `repr(C)`:
//! * builtin types making no guaratees about binary layout (e.g.
... |
TOML | hhvm/hphp/hack/src/utils/ffi_cbindgen/Cargo.toml | # @generated by autocargo
[package]
name = "ffi_cbindgen"
version = "0.0.0"
edition = "2021"
[[bin]]
name = "ffi_cbindgen"
path = "ffi_cbindgen.rs"
[dependencies]
anyhow = "1.0.71"
cbindgen = "0.22.0"
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] } |
Rust | hhvm/hphp/hack/src/utils/ffi_cbindgen/ffi_cbindgen.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::path::PathBuf;
use anyhow::Result;
use cbindgen::Builder;
use cbindgen::Config;
use cbindgen::EnumConfig;
use cbindgen::Langua... |
TOML | hhvm/hphp/hack/src/utils/files_to_ignore/Cargo.toml | # @generated by autocargo
[package]
name = "files_to_ignore"
version = "0.0.0"
edition = "2021"
[lib]
path = "../files_to_ignore.rs"
[dependencies]
regex = "1.9.2" |
OCaml | hhvm/hphp/hack/src/utils/file_content/file_content.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type position = {
line: int;
(* 1-based *)
column: int; (* 1-based *)
}
type range = {
st: ... |
OCaml Interface | hhvm/hphp/hack/src/utils/file_content/file_content.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type position = {
line: int;
(* 1-based *)
column: int; (* 1-based *)
}
type range = {
st: position;
ed: ... |
OCaml | hhvm/hphp/hack/src/utils/file_url/file_url.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
(* File urls: https://tools.ietf.org/html/rfc8089 *)
(* Related definit... |
OCaml Interface | hhvm/hphp/hack/src/utils/file_url/file_url.mli | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val parse : string -> string
val create : string -> string |
TOML | hhvm/hphp/hack/src/utils/find_utils/Cargo.toml | # @generated by autocargo
[package]
name = "find_utils"
version = "0.0.0"
edition = "2021"
[lib]
path = "../find_utils.rs"
[dependencies]
anyhow = "1.0.71"
files_to_ignore = { version = "0.0.0", path = "../files_to_ignore" }
jwalk = "0.6"
relative_path = { version = "0.0.0", path = "../rust/relative_path" }
[dev-de... |
hhvm/hphp/hack/src/utils/full_fidelity_refactor/dune | (library
(name full_fidelity_refactor)
(wrapped true)
(flags
(:standard -linkall))
(libraries
full_fidelity
server_command_types
relative_path
)
(preprocess
(pps visitors.ppx ppx_deriving.std ppx_sexp_conv ppx_hash))) | |
OCaml | hhvm/hphp/hack/src/utils/full_fidelity_refactor/full_fidelity_refactor.ml | (*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
module Syn = Full_fidelity_editable_positioned_syntax
module SyntaxKind = Full_fidelity_syntax_kind
module Tr... |
OCaml Interface | hhvm/hphp/hack/src/utils/full_fidelity_refactor/full_fidelity_refactor.mli | (*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(*
* Utilities for generating `ServerRenameTypes.patch`s
* from `full_fidelity` parse trees.
*)
val insert_attribute :
... |
Rust | hhvm/hphp/hack/src/utils/hack_macros/ast_writer.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::collections::HashMap;
use std::fmt;
use std::rc::Rc;
use proc_macro2::Delimiter;
use proc_macro2::Group;
use proc_macro2::Ident;
... |
Rust | hhvm/hphp/hack/src/utils/hack_macros/hack_macros.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
/// A macro to build Hack Expr trees.
///
/// Usage:
/// hack_expr!(pos = p, "#foo + $bar")
///
/// Returns an ast::Expr representing t... |
Rust | hhvm/hphp/hack/src/utils/hack_macros/hack_macros_impl.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#![feature(box_patterns)]
mod ast_writer;
use std::collections::HashMap;
use std::collections::HashSet;
use std::sync::Arc;
use aast_pars... |
TOML | hhvm/hphp/hack/src/utils/hack_macros/cargo/hack_macros/Cargo.toml | # @generated by autocargo
[package]
name = "hack_macros"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../hack_macros.rs"
[dependencies]
hack_macros_impl = { version = "0.0.0", path = "../hack_macros_impl" }
oxidized = { version = "0.0.0", path = "../../../../oxidized" } |
TOML | hhvm/hphp/hack/src/utils/hack_macros/cargo/hack_macros_impl/Cargo.toml | # @generated by autocargo
[package]
name = "hack_macros_impl"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../hack_macros_impl.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
aast_parser = { version = "0.0.0", path = "../../../../parser/cargo/aast_parser" }
once_cell = "1.12"
oxidized = { ve... |
TOML | hhvm/hphp/hack/src/utils/hash/Cargo.toml | # @generated by autocargo
[package]
name = "hash"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
dashmap = { version = "5.4", features = ["rayon", "serde"] }
indexmap = { version = "1.9.2", features = ["arbitrary", "rayon", "serde-1"] }
rustc-hash = "1.1.0" |
Rust | hhvm/hphp/hack/src/utils/hash/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
pub type Hasher = rustc_hash::FxHasher;
pub type BuildHasher = std::hash::BuildHasherDefault<Hasher>;
pub type HashMap<K, V> = rustc_hash::FxHashMap<K, V>;
pub type HashSet<K> = rustc_hash::FxHashSet<K>;
pub type IndexMap<K, V> = indexmap::map::I... |
C/C++ | hhvm/hphp/hack/src/utils/hashlib/bitfn.h | /*
* Copyright (C) 2006-2009 Vincent Hanquez <tab@snarc.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS... |
hhvm/hphp/hack/src/utils/hashlib/dune | (library
(name utils_hash)
(wrapped false)
(foreign_stubs
(language c)
(names sha1_ocaml sha1c))
(libraries core_kernel)) | |
OCaml | hhvm/hphp/hack/src/utils/hashlib/sha1.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Tools for making sha1 digests. *)
external digest : string -> string = "sha1sum" |
C | hhvm/hphp/hack/src/utils/hashlib/sha1c.c | /*
* Copyright (C) 2006-2009 Vincent Hanquez <tab@snarc.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS... |
C/C++ | hhvm/hphp/hack/src/utils/hashlib/sha1c.h | /*
* Copyright (C) 2006-2009 Vincent Hanquez <tab@snarc.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS... |
C | hhvm/hphp/hack/src/utils/hashlib/sha1_ocaml.c | /**
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/alloc.h>
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include "sha1c... |
Rust | hhvm/hphp/hack/src/utils/hdf/build.rs | use std::path::Path;
use std::path::PathBuf;
fn main() {
const ROOT_PATH: &str = "../../../../..";
let root_path = Path::new(ROOT_PATH);
let hphp_path = root_path.join("hphp");
let neo_path = hphp_path.join("neo");
let neo_files: Vec<PathBuf> = glob::glob(neo_path.join("*.c").to_str().unwrap())
... |
TOML | hhvm/hphp/hack/src/utils/hdf/Cargo.toml | # @generated by autocargo
[package]
name = "hdf"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
crate-type = ["lib", "staticlib"]
[dependencies]
cxx = "1.0.100"
thiserror = "1.0.43"
[build-dependencies]
cc = ">=1.0.79"
cxx-build = "1.0.100"
glob = ">=0.3.0" |
C++ | hhvm/hphp/hack/src/utils/hdf/hdf-wrap.cpp | // Copyright (c) Meta Platforms, Inc. and affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#include "hphp/hack/src/utils/hdf/hdf-wrap.h"
namespace HPHP {
std::unique_ptr<Hdf> hdf_new() {
return std::make_unique<Hdf>();
}
st... |
C/C++ | hhvm/hphp/hack/src/utils/hdf/hdf-wrap.h | // Copyright (c) Meta Platforms, Inc. and affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#pragma once
#include "hphp/util/hdf.h"
#include "rust/cxx.h"
#include <memory>
namespace HPHP {
std::unique_ptr<Hdf> hdf_new();
std::un... |
Rust | hhvm/hphp/hack/src/utils/hdf/hdf.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#[cxx::bridge(namespace = "HPHP")]
pub(crate) mod ffi {
unsafe extern "C++" {
include!("hphp/hack/src/utils/hdf/hdf-wrap.h");... |
Rust | hhvm/hphp/hack/src/utils/hdf/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
mod hdf;
mod value;
pub use value::*; |
Rust | hhvm/hphp/hack/src/utils/hdf/value.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::borrow::Cow;
use std::ffi::CStr;
use std::os::unix::ffi::OsStrExt;
use std::path::Path;
use cxx::let_cxx_string;
use cxx::Unique... |
hhvm/hphp/hack/src/utils/hg/dune | (library
(name hg)
(wrapped false)
(modules hg hg_sig)
(libraries exec_command injector_config process process_types future)
(preprocess
(pps lwt_ppx ppx_deriving.std)))
(executable
(name hg_runner)
(modules hg_runner)
(link_flags
(:standard
(:include ../../dune_config/ld-opts.sexp)))
(modes exe byte_c... | |
OCaml | hhvm/hphp/hack/src/utils/hg/hg.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Tools for shelling out to Mercurial. *)
module Hg_actual = struct
include Hg_sig.Types
let rev_string rev ... |
OCaml Interface | hhvm/hphp/hack/src/utils/hg/hg.mli | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Hg_sig.S |
OCaml | hhvm/hphp/hack/src/utils/hg/hg_runner.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* Prints out the current HG revision, closest SVN ancestor, and the files
* changed between that HG revision a... |
OCaml | hhvm/hphp/hack/src/utils/hg/hg_sig.ml | module Types = struct
exception Malformed_result
type hg_rev = string [@@deriving eq, show]
(** This is a monotonically increasing revision number. *)
type global_rev = int [@@deriving eq, show]
type rev =
| Hg_rev of hg_rev
| Global_rev of global_rev
[@@deriving eq, show]
module Rev_comparato... |
TOML | hhvm/hphp/hack/src/utils/hh24_types/Cargo.toml | # @generated by autocargo
[package]
name = "hh24_types"
version = "0.0.0"
edition = "2021"
[lib]
path = "hh24_types.rs"
[dependencies]
anyhow = "1.0.71"
derive_more = "0.99.17"
file_info = { version = "0.0.0", path = "../../deps/rust/file_info" }
hh_hash = { version = "0.0.0", path = "../hh_hash" }
relative_path = {... |
Rust | hhvm/hphp/hack/src/utils/hh24_types/hh24_types.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
//! Common types used in the HH24 Hack typechecker rearchitecture.
// Common impls for types which wrap a hash value represented by u64... |
TOML | hhvm/hphp/hack/src/utils/hhvm_options/Cargo.toml | # @generated by autocargo
[package]
name = "hhvm_options"
version = "0.0.0"
edition = "2021"
[lib]
path = "hhvm_options.rs"
[dependencies]
anyhow = "1.0.71"
clap = { version = "4.3.5", features = ["derive", "env", "string", "unicode", "wrap_help"] }
hdf = { version = "0.0.0", path = "../hdf" }
hhvm_runtime_options =... |
Rust | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_config.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use anyhow::Result;
#[derive(Debug, Default)]
pub struct HhvmConfig {
pub hdf_config: hdf::Value,
pub ini_config: hdf::Value,
}
impl HhvmConfig {
pub fn get_str<'a>(&'a self, key: &str) -> Result<Option<String>> {
self.get_he... |
Rust | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_options.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
mod hhvm_config;
use std::ffi::OsStr;
use std::path::PathBuf;
use anyhow::anyhow;
use anyhow::Result;
use clap::ArgAction;
use clap::Parser;
pub use hhvm_config::*;
// Define HHVM-compatible options, as best as we can with clap.
#[derive(Debug,... |
Rust | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/build.rs | use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
fn main() {
// Assumes the hack workspace 'fbcode/hphp/hack/src/Cargo.toml'.
let mut cargo_cmd = Command::new("cargo");
cargo_cmd.args(&["locate-project", "--workspace", "--message-format=plain"]);
let output = cargo_cmd.output().u... |
TOML | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/Cargo.toml | # @generated by autocargo
[package]
name = "hhvm_runtime_options"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
anyhow = "1.0.71"
cxx = "1.0.100"
hdf = { version = "0.0.0", path = "../../hdf" }
log = { version = "0.4.17", features = ["kv_unstable", "kv_unstable_std"] }
[build-dependencies]... |
C++ | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/ffi_bridge.cpp | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#include "hphp/util/process-cpu.h"
#include "hphp/util/process-host.h"
#include "rust/cxx.h"
rust::String Process_GetCPUModel() {
return HPHP::Process::GetCPUModel();
}
rust::String Process_GetHostName() {
return HPHP::Process::GetHostName... |
C/C++ | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/ffi_bridge.h | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#pragma once
#include "rust/cxx.h"
rust::String Process_GetCPUModel();
rust::String Process_GetHostName(); |
Rust | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/ffi_bridge.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
// This is needed by cxx
#![allow(dead_code)]
// clippy doesn't like "Process_GetCPUModel"
#[allow(unknown_lints)]
#[cxx::bridge]
pub mod cxx_ffi {
unsafe extern "C++" {
include!("hphp/hack/src/utils/hhvm_options/hhvm_runtime_options... |
C/C++ | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/ffi_status.h | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#pragma once
enum {
FFI_STATUS_ENUM_INITIALIZER = -1000,
// WARNING: Match "hphp/facebook/hacknative/systemlib/hn/main.php".
FFI_STATUS_THROW_Exception,
FFI_STATUS_THROW_InvalidArgumentException,
// WARNING: Match "hphp/facebook/hackn... |
Rust | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
mod ffi_bridge;
pub mod runtime_options;
pub(crate) use ffi_bridge::cxx_ffi; |
Rust | hhvm/hphp/hack/src/utils/hhvm_options/hhvm_runtime_options/runtime_options.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use std::borrow::Cow;
use std::fs;
use anyhow::Result;
use crate::cxx_ffi;
/// A machine can belong to a tier, which can overwrite
/// various settings, even if they are set in the same
/// hdf file. However, CLI overrides still win the day ov... |
Rust | hhvm/hphp/hack/src/utils/hh_config/hh_config.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
mod local_config;
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use std::path::Path;
use std::path::PathBuf;
use std::... |
Rust | hhvm/hphp/hack/src/utils/hh_config/local_config.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use anyhow::Result;
use config_file::ConfigFile;
use oxidized::global_options::SavedState;
use oxidized::saved_state_rollouts::SavedSt... |
TOML | hhvm/hphp/hack/src/utils/hh_config/cargo/Cargo.toml | # @generated by autocargo
[package]
name = "hh_config"
version = "0.0.0"
edition = "2021"
[lib]
path = "../hh_config.rs"
[dependencies]
anyhow = "1.0.71"
config_file = { version = "0.0.0", path = "../../config_file/rust" }
oxidized = { version = "0.0.0", path = "../../../oxidized" }
serde = { version = "1.0.176", fe... |
TOML | hhvm/hphp/hack/src/utils/hh_hash/Cargo.toml | # @generated by autocargo
[package]
name = "hh_hash"
version = "0.0.0"
edition = "2021"
[lib]
path = "hh_hash.rs"
[dependencies]
fnv = "1.0"
no_pos_hash = { version = "0.0.0", path = "../no_pos_hash" } |
Rust | hhvm/hphp/hack/src/utils/hh_hash/hh_hash.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
pub use std::hash::Hash;
pub use std::hash::Hasher;
pub use no_pos_hash::position_insensitive_hash;
pub fn hash<T: Hash>(value: &T) ->... |
OCaml | hhvm/hphp/hack/src/utils/hh_json/hh_json.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* Hh_json parsing and pretty printing library.
*)
(*
<value> ::=
| <object>
| <array>
| <string>
| <n... |
OCaml Interface | hhvm/hphp/hack/src/utils/hh_json/hh_json.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(*
* Hh_json parsing and pretty printing library.
*)
type json =
| JSON_Object of (string * json) list
| JSON... |
OCaml | hhvm/hphp/hack/src/utils/hh_json/hh_json_helpers.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
* *)
module Option = Base.Option
module Int = Base.Int
module List = Base.List
open Hh_json
(*************************... |
Rust | hhvm/hphp/hack/src/utils/hh_slog/hh_slog.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::io;
use slog::o;
use slog::Drain;
const TIMESTAMP_FORMAT: &str = "[%Y-%m-%d %H:%M:%S%.3f]";
fn timestamp_format(io: &mut dyn... |
Rust | hhvm/hphp/hack/src/utils/hh_slog/locked_file_drain.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use fs2::FileExt;
use slog::Drain;
/// Locks the file when logging. Prevents multi-process writes from mangling if
/// every process ... |
TOML | hhvm/hphp/hack/src/utils/hh_slog/cargo/hh_slog/Cargo.toml | # @generated by autocargo
[package]
name = "hh_slog"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../hh_slog.rs"
[dependencies]
chrono = { version = "0.4", features = ["clock", "serde", "std"], default-features = false }
locked_file_drain = { version = "0.0.0", path = "../locked_file_drain" }
slog = { version... |
TOML | hhvm/hphp/hack/src/utils/hh_slog/cargo/locked_file_drain/Cargo.toml | # @generated by autocargo
[package]
name = "locked_file_drain"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../locked_file_drain.rs"
[dependencies]
fs2 = "0.4"
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
slog-json = "2.3"
[dev-dependencies]
serde_json = { version = "1.0.100", ... |
TOML | hhvm/hphp/hack/src/utils/html_entities/Cargo.toml | # @generated by autocargo
[package]
name = "html_entities"
version = "0.0.0"
edition = "2021"
[lib]
path = "html_entities.rs"
[dependencies]
lazy_static = "1.4"
ocaml_helper = { version = "0.0.0", path = "../ocaml_helper" }
regex = "1.9.2"
[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc... |
Rust | hhvm/hphp/hack/src/utils/html_entities/decoder.rs | /**
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree. An additional
* directory.
*/
/**
* HTML5 special entity decoding
*
* HHVM decodes certain HTML entities present in i... |
Rust | hhvm/hphp/hack/src/utils/html_entities/html_entities.rs | // Copyright (c) 2019, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#[macro_use]
extern crate lazy_static;
pub mod decoder;
use ocaml_helper::int_of_string_opt;
use regex::bytes::Captures;
use ... |
Rust | hhvm/hphp/hack/src/utils/html_entities/test/bench.rs | // Copyright (c) 2019, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#![feature(test)]
#[cfg(test)]
extern crate test;
fn main() {
let command =
"buck run @//mode/opt //hphp/hack/src/... |
TOML | hhvm/hphp/hack/src/utils/html_entities/test/Cargo.toml | # @generated by autocargo
[package]
name = "tests"
version = "0.0.0"
edition = "2021"
[lib]
path = "utf32_to_utf8.rs"
[[bin]]
name = "bench"
path = "bench.rs"
[dev-dependencies]
html_entities = { version = "0.0.0", path = ".." }
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false } |
Rust | hhvm/hphp/hack/src/utils/html_entities/test/utf32_to_utf8.rs | /**
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree. An additional
* directory.
*
**
*
* THIS FILE IS @generated; DO NOT EDIT IT
* To regenerate this file, run
*
* bu... |
OCaml | hhvm/hphp/hack/src/utils/http_lite/http_lite.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
(* This is a lightweight library for reading and writing messages in the HTTP
format, with heade... |
OCaml Interface | hhvm/hphp/hack/src/utils/http_lite/http_lite.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
exception Malformed of string
val write_message : out_channel -> string -> unit
val read_headers : Buffered_line_r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.