Giter VIP home page Giter VIP logo

wip_procfile_rust_buildpack's Introduction

Heroku Cloud Native JVM Function Invoker Buildpack

Requirements

  • Rust via rustup.
  • x86_64-unknown-linux-musl Rust target: rustup target add x86_64-unknown-linux-musl
  • cargo-make: cargo install cargo-make
  • musl libc
    • Linux (Debian): sudo apt install musl-tools
    • MacOS via homebrew-musl-cross: brew install FiloSottile/musl-cross/musl-cross
  • libssl-dev
    • Linux (Debian): sudo apt install libssl-dev
    • MacOS: brew install openssl
  • pack (for local development)

Usage

This buildpack targets x86_64-unknown-linux-musl as the platform for the buildpack and comes with tooling to support cross-compilation on macOS. It uses libcnb.rs as the language binding for buildpacks.

Development

To use this buildpack for local development that can be used by pack, a buildpack dir needs to be made:

$ cargo make pack

This will create a target/ directory that can be passed to pack. If a default builder hasn't been set, the heroku one can be set:

$ pack config default-builder heroku/buildpacks:20

With the heroku builder image set and from the buildpack directory:

$ pack build <IMAGE NAME> -b heroku/jvm -b heroku/maven -b `target` -p <APP SOURCE DIR>

Production

cargo-make has the concept of profiles which is how it can choose where to do a "release" build with optimizations for runtime vs. optimizing for build speed.

When packaging up the buildpack the build.sh script uses this cargo-make command:

$ cargo make pack --profile production

Testing

To run the unit + doc tests:

$ cargo test

License

Licensed under the MIT License. See LICENSE file.

wip_procfile_rust_buildpack's People

Contributors

schneems avatar

Watchers

James Cloos avatar  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.