Giter VIP home page Giter VIP logo

jagen's People

Contributors

anykey111 avatar bazurbat avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jagen's Issues

Rust support

Hi, i saw you have landed initial Rust support.
Currently I'm using CMake and run Cargo as ExternalProject because it fit well with existing C projects, simplify lot of things like strip, deploy and passing target options.

Would be nice to see how build.type='rust' intended to use.

sample of project using Rust+CMake:

Findcargo.cmake

set(CARGO "$ENV{HOME}/.cargo/bin/cargo")
set(CARGO_CROSS PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$ENV{jagen_target_dir}/usr/lib/pkgconfig ${CARGO})

CMakeLists.txt

project(astindex2)

find_package(cargo)

include(ExternalProject)

set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust)

set(CRATE_DIR "$ENV{jagen_src_dir}/${PROJECT_NAME}")

add_custom_target(${PROJECT_NAME} ALL
  COMMAND ${CARGO_CROSS} rustc -v --release --target arm-unknown-linux-gnueabi -- -L $ENV{jagen_target_dir}/usr/lib
  WORKING_DIRECTORY ${CRATE_DIR})

install(FILES ${CRATE_DIR}/target/arm-unknown-linux-gnueabi/release/lib${PROJECT_NAME}.so DESTINATION lib)
install(FILES ${CRATE_DIR}/include/astcatalog.h DESTINATION include)

jagen/lib/pkg/rust-arm-toolchain.lua

return {
    source = {
        type = 'dist',
        location = 'http://10.0.2.2/sw/linux/dist/rust-1.24.1.tar.bz2',
    },
    build = {
        in_source = true,
        toolchain = false
    }
}

jagen/lib/pkg/rust-arm-toolchain.sh

#!/bin/sh

CARGO_HOME="$HOME/.cargo"
RUSTUP_HOME="$HOME/.rustup"

jagen_pkg_unpack() {
    toolchain_unpack "$pkg_name" "$pkg_source_dir"
    pkg_run rm -rf "$CARGO_HOME"
    pkg_run rm -rf "$RUSTUP_HOME"
    pkg_run ln -sf "$pkg_source_dir/.cargo" "$CARGO_HOME"
    pkg_run ln -sf "$pkg_source_dir/.rustup" "$RUSTUP_HOME"
}

#todo: consider using rustup
RUSTUP_INIT="${jagen_dist_dir}/rustup-init"
RUSTUP_INIT_URL="https://static.rust-lang.org/rustup/archive/1.11.0/x86_64-unknown-linux-gnu/rustup-init"

jagen_pkg_unpack_todo() {
    if [ ! -e "$RUSTUP_INIT" ]; then
        pkg_run wget -r -N -c -O "$RUSTUP_INIT" "$RUSTUP_INIT_URL"
    fi

    [ -L "$CARGO_HOME" ] && pkg_run rm "$CARGO_HOME"
    [ -L "$RUSTUP_HOME" ] && pkg_run rm "$RUSTUP_HOME"

    pkg_run chmod +x "$RUSTUP_INIT"
    pkg_run "$RUSTUP_INIT" -y -v --default-toolchain 1.24.1
    pkg_run rustup target add arm-unknown-linux-gnueabi
}

Lack of User Guide

Write a User Guide with explanations about design choices and recommended practices on how to adopt Jagen for your own needs.

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.