Coder Social home page Coder Social logo

jesin / capnp_import Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ugandalf/capnp-import

0.0 0.0 0.0 2.62 MB

Fetches official Cap-n-Proto compiler (capnp) releases and automatically compiles all capnp files in a set of folders, then combines them in a single capnp_include.rs file.

License: Apache License 2.0

Shell 0.78% JavaScript 0.07% C++ 94.25% Python 0.08% C 0.02% Emacs Lisp 0.03% Rust 0.10% CSS 0.24% Nix 0.06% Makefile 0.40% Cap'n Proto 2.55% HTML 0.09% CMake 0.66% M4 0.39% Starlark 0.29%

capnp_import's Introduction

capnp_import

Rust library for fetching the official Cap-n-Proto compiler (capnp) for a particular operating system, compiling files and aggregating them into a helper include file.

capnp_import builds a set of paths to files or folders using the capnp tool, which it downloads or builds if it is missing, and aggregates the resulting import files into a helper include file. Usage:

// Inside build.rs
capnp_import::process(&["schema"]).expect("Capnp generation failed!");

// Inside main.rs
use std::env;

include!(concat!(env!("OUT_DIR"), "/capnp_include.rs"));

A release archive for the given version for the current operating system will be downloaded and the binary will be extracted into the target directory. If a particular version was already downloaded and is present in the target directory, it will be reused. If no binary is available, a source release will be downloaded and a build will be attempted. If this isn't supported, the tool will try to use an existing capnp installation on the machine.

capnp_import's People

Contributors

bootstrap-prime avatar erikmcclure avatar jesin 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.