Giter VIP home page Giter VIP logo

rules_elisp's Introduction

Bazel rules for Emacs Lisp

This repository provides a Bazel integration for Emacs Lisp. It is modeled after the rules definitions for other languages, like the C++ rules.

This is not an officially supported Google product.

Usage

Add a snippet like the following to your Bazel WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "phst_rules_elisp",
    sha256 = "bd18a031ffcfccf2c8e0ef5296b42253ee75130eb3019ce765143830dfdf57dc",
    strip_prefix = "rules_elisp-b59849b6cbbff6a081a6088d74fb258d27dfdd5b",
    urls = ["https://github.com/phst/rules_elisp/archive/b59849b6cbbff6a081a6088d74fb258d27dfdd5b.zip"],
)

load(
    "@phst_rules_elisp//elisp:repositories.bzl",
    "rules_elisp_dependencies",
    "rules_elisp_toolchains",
)

rules_elisp_dependencies()

rules_elisp_toolchains()

Then you can use the elisp_library, elisp_binary, and elisp_test rules. See the generated documentation and the examples in the examples directory for details.

Load path management

The Emacs Lisp rules by default only add the workspace root directories to the load path. However, many Emacs Lisp libraries assume that their immediate parent directory is present in the load path. To support such libraries, the elisp_library rule supports an optional load_path attribute. You can specify additional load path directories using this attribute. Relative directories are relative to the Bazel package directory; absolute directories are relative to the workspace root. A typical use case is to specify load_path = ["."] to add the current package to the load path.

Runfiles

This repository also includes a library to access runfiles. To use it, add a build dependency on @phst_rules_elisp//elisp/runfiles. See the header comments in runfiles.el for further usage hints.


The following symbols are defined in //elisp/defs.bzl:

{% include_relative elisp.md %}


The following symbols are defined in //elisp/repositories.bzl:

{% include_relative repositories.md %}


The following symbols are defined in //emacs/defs.bzl:

{% include_relative emacs.md %}

rules_elisp's People

Contributors

phst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.