Coder Social home page Coder Social logo

pint.nix's Introduction

pint.nix

A Nix flake for the Pint intent language.

Supports Linux & macOS.

Usage

  1. Install Nix, easiest with the Determinate Systems installer.

  2. Use Nix to enter a shell with the pint, pintc and pintfmt CLIs:

    nix shell github:essential-contributions/pint.nix

    By default, this installs pintc with solving capabilities (via the pintWithSolver package) by binding to scip. To build pintc purely with constraint checking capabilities, you can use:

    nix shell github:essential-contributions/pint.nix#pint
  3. Check that it works with:

    pint -h

Developing pint

If you're working on the pint repo itself, the following command can be useful. It allows you to enter a development shell with all of the necessary dependencies and environment variables to build pint with solving enabled and run the tests. This includes, rust, scip, clang (for bindgen), etc.

nix develop github:essential-contributions/pint.nix

Now when you run cargo build or cargo nextest run, bindgen will bind to the scip libraries installed by Nix (rather than downloading them at build time). We can check this works with the following:

$ cd /path/to/pint

$ cargo nextest run

pint.nix's People

Contributors

mitchmindtree avatar github-actions[bot] avatar freesig avatar

Watchers

 avatar

pint.nix's Issues

Add a `buildPintPackage` for creating intent derivations

This would be similar to nixpkgs' buildRustPackage that takes care of a lot of the boiler plate in creating derivations for rust packages.

The result of building a buildPintPackage derivation might be something like:

result
└── intent
    └── my-intent
        ├── my-intent-meta.json -> /nix/store/czlxsdaajzjigmd4wlhvbp48p59mlf94-intents-my-intent.pint-meta-0.1.0/intent/my-intent/my-intent-meta.json
        └── my-intent.hex -> /nix/store/6s6h60fyhpcrhq1i36ckda60ab446v10-intents-my-intent.pint-bytecode-0.1.0/intent/my-intent/my-intent.hex

Or something along these lines, ready for deployment.

It'd also be interesting to use it as a way to compose together multiple different yurt "libs" that provide different types and macros.

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.