diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 1ad710f..4e69f3a 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,5 +1,6 @@ name: 🐛 Bug Report description: Create a report to help us reproduce and fix the bug +title: "🐛[Bug Report]: " labels: ["bug"] body: diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 8354753..bc30a06 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,4 +1,4 @@ -name: Feature Request +name: 🚀 Feature Request description: Request new or improved functionality title: "🚀[Feature Request]: " labels: ["enhancement"] diff --git a/Cargo.toml b/Cargo.toml index 34225fd..bb7fb1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + [package] name = "gni" version = "0.1.0" diff --git a/Makefile b/Makefile index 4fb4dba..44af1e0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + BUILD_MODE ?= debug ifeq ($(BUILD_MODE), release) diff --git a/README.md b/README.md index baa78a8..e5ff48a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,9 @@ GNI offers the same core functionality for each supported language, provides bin > Note: If you’d like support for another language, please open an issue or submit a pull request! -## Contributing +### Contributing + +Read our contributing guide to learn about our development process, how to propose bugfixes and feature requests, and how to build your changes. ### [Code of Conduct](https://code.fb.com/codeofconduct) diff --git a/pyproject.toml b/pyproject.toml index 2578ac7..d106d4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + [build-system] requires = ["maturin>=1.0"] build-backend = "maturin" diff --git a/src/build.rs b/src/build.rs index 61fc1b5..ed92a15 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + fn main() { if std::env::var("CARGO_FEATURE_CPP").is_ok() { // C++ build diff --git a/src/c/GNI.c b/src/c/GNI.c index 491ecd1..6e610ca 100644 --- a/src/c/GNI.c +++ b/src/c/GNI.c @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #include "GNI.h" #include #include diff --git a/src/c/GNI.h b/src/c/GNI.h index 4fec33b..b3de3f1 100644 --- a/src/c/GNI.h +++ b/src/c/GNI.h @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #pragma once #ifdef __cplusplus diff --git a/src/c/Makefile b/src/c/Makefile index 2b02782..0d48a86 100644 --- a/src/c/Makefile +++ b/src/c/Makefile @@ -1,3 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. .PHONY: all libGNI.a clean diff --git a/src/c/main.c b/src/c/main.c index c69da73..219cb81 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #include extern char* c_get_gpu_node_id(); diff --git a/src/c/mod.rs b/src/c/mod.rs index c66daae..95b8b95 100644 --- a/src/c/mod.rs +++ b/src/c/mod.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + use std::ffi::CString; use std::os::raw::c_char; diff --git a/src/constants.rs b/src/constants.rs index e156e94..8b6e140 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1 +1,7 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + pub const DEFAULT_CACHE_FILEPATH: &str = "/tmp/gni"; diff --git a/src/cpp/GNI.cpp b/src/cpp/GNI.cpp index 65f3eb4..c33b1f1 100644 --- a/src/cpp/GNI.cpp +++ b/src/cpp/GNI.cpp @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #include "mod.rs.h" #include "GNI.h" diff --git a/src/cpp/GNI.h b/src/cpp/GNI.h index acf0654..1f6a820 100644 --- a/src/cpp/GNI.h +++ b/src/cpp/GNI.h @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #pragma once #include diff --git a/src/cpp/README.md b/src/cpp/README.md index f85f241..b2dbedd 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -1,4 +1,4 @@ -# gni - cpp +# GNI - cpp We're using [cxx](https://cxx.rs/#cxx--safe-interop-between-rust-and-c) to expose cpp bindings. diff --git a/src/cpp/main.cpp b/src/cpp/main.cpp index 4488441..70b4f18 100644 --- a/src/cpp/main.cpp +++ b/src/cpp/main.cpp @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #include #include "GNI.h" diff --git a/src/cpp/mod.rs b/src/cpp/mod.rs index e2e61f2..345bf12 100644 --- a/src/cpp/mod.rs +++ b/src/cpp/mod.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + #[cxx::bridge] mod ffi { // Expose functions to cpp diff --git a/src/go/README.md b/src/go/README.md index ba3cfe7..00e8c51 100644 --- a/src/go/README.md +++ b/src/go/README.md @@ -1,4 +1,4 @@ -# gni - go +# GNI - go GNI for Go uses a C library via cgo to bridge Rust functionality into Go. diff --git a/src/go/cgo/cgo.go b/src/go/cgo/cgo.go index 3728d78..ae12d8b 100644 --- a/src/go/cgo/cgo.go +++ b/src/go/cgo/cgo.go @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + package cgo /* diff --git a/src/go/main.go b/src/go/main.go index 5ca6bd2..35b6cbe 100644 --- a/src/go/main.go +++ b/src/go/main.go @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + package main import ( diff --git a/src/lib.rs b/src/lib.rs index ca04170..4217045 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + use anyhow::{anyhow, Context, Result}; use std::fs; use std::path::Path; diff --git a/src/main.rs b/src/main.rs index 412966f..50365a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + use anyhow::Context; use clap::Parser; use std::path::PathBuf; diff --git a/src/python/README.md b/src/python/README.md index 032c5ad..81d84a7 100644 --- a/src/python/README.md +++ b/src/python/README.md @@ -1,4 +1,4 @@ -# gni - Python pkg +# GNI - Python pkg GNI uses [pyo3](https://pyo3.rs/main/getting-started.html?#installation) to write a native python library, and diff --git a/src/python/main.py b/src/python/main.py index 24bd2f1..de67953 100644 --- a/src/python/main.py +++ b/src/python/main.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + import gni_lib def main(): diff --git a/src/python/mod.rs b/src/python/mod.rs index 87d2c34..54d86f4 100644 --- a/src/python/mod.rs +++ b/src/python/mod.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. + +// This source code is licensed under the license found in the +// LICENSE file in the root directory of this source tree. + use std::path::PathBuf; use pyo3::prelude::*; diff --git a/src/python/python_py_ext.pyi b/src/python/python_py_ext.pyi index f23e97f..068a44a 100644 --- a/src/python/python_py_ext.pyi +++ b/src/python/python_py_ext.pyi @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + from typing import Optional def get_gpu_node_id(cache_file_path: Optional[str]) -> str: ...