Commit graph

5 commits

Author SHA1 Message Date
Ryan Kuester
068c6a59b6
build(bazel): inject tflite_micro shim via tflm_py_* wrappers (#3573)
Python targets in this repository import one another under the
"tflite_micro" package namespace, which //:tflite_micro_shim synthesizes
at import time. The shim is required under Bzlmod, where the main
repository's runfiles root is the fixed name "_main" rather than the
module name, so the "tflite_micro" prefix no longer resolves on its own.
Every such target therefore had to list //:tflite_micro_shim in its
deps, which was repetitive and easy to forget.

Add tflm_py_library, tflm_py_test, and tflm_py_binary wrappers in a new
//python:py_rules.bzl that inject the shim dependency automatically,
following the naming convention of the existing tflm_cc_* wrappers, and
document the shim's rationale there. Convert every target that
previously listed the shim to the corresponding wrapper and drop the
explicit dependency. The dependency graph is unchanged; only the means
by which the shim is attached differs.
2026-05-26 19:51:58 +00:00
Esun Kim
807c35d6a9
Bazel Module (#3364)
* Work

* Review update

* Enabled tests

* Bazel: Suppress warnings from external repositories

* Fixed whl_test

* Formatted

* More format
2026-02-11 14:11:47 -08:00
Esun Kim
ba753cef3e
[CI] Fix build (#3194)
- Upgraded the Bazel BuildTool to the latest version (8.2.1).
- Updated the `tflm-ci` Docker image and pushed the new tag (0.6.1) to the `ghcr.io/tflm-bot/tflm-ci registry`.
- Updated the WORKSPACE to load `rules_cc` and `rules_shell` explicitly
- Ran `buildifier` to ensure all BUILD files to have all the fixes.

BUG=Clean-up
2025-09-19 20:48:22 +00:00
Ryan Kuester
31b0d73b17
build(bazel): add --//:with_compression build setting (#2843)
Add a --//:with_compression user-defined build setting and a
corresponding configuration setting.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-11-20 14:01:21 -08:00
Ryan Kuester
10832014b6
build: add target to generate compiler_commands.json (#1658)
Add a target `bazel run :refresh_compile_commands` to generate `./compile_commands.json`, which can be used by various tools like editors and language servers to provide features like intelligent navigation and autocompletion based on the source graph and compiler commands.

For more about this can be used:
* [clangd: Teach your editor C++](https://clangd.llvm.org)
* [Getting started with neovim's native LSP client: The easy way](https://dev.to/vonheikemen/getting-started-with-neovims-native-lsp-client-in-the-year-of-2022-the-easy-way-bp3#starting-from-scratch)
* [Language Server Protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol)

BUG=cleanup, see description
2023-01-13 05:13:47 +00:00