Git Product home page Git Product logo

hyperon-experimental's Introduction

CI

Overview

This is a reimplementation from scratch of the C++ Hyperon prototype in the Rust programming language. This project replaces the previous prototype. See Python examples to become familiar with Hyperon features.

If you find troubles with the installation, see the Troubleshooting section below.

Prerequisites

Install latest stable Rust, see Rust installation page.

Hyperon library

Build and test the library:

cd ./lib
cargo build
cargo test

To enable logging during tests execute:

RUST_LOG=hyperon=debug cargo test

C and Python API

Prerequisites (must be executed in the top directory of the repository):

cargo install cbindgen
python -m pip install conan==1.47
python -m pip install -e ./python[dev]

Setup build:

mkdir -p build
cd build
cmake ..

Build and run tests:

make
make check

To run release build use following instead of cmake ..:

cmake -DCMAKE_BUILD_TYPE=Release ..

Running Python examples from command line

In order to run Python examples you need adding Python libraries into the PYTHONPATH after compilation:

cd build
export PYTHONPATH=$PYTHONPATH:`pwd`/python:`pwd`/../python

Language support for IDEs [optional]

Different IDEs may require different tweaks to support the languages used in the codebase. The language servers which we use for development are:

Troubleshooting

Conan claims it cannot find out the version of the C compiler

If you see the following cmake output:

ERROR: Not able to automatically detect '/usr/bin/cc' version
ERROR: Unable to find a working compiler
WARN: Remotes registry file missing, creating default one in /root/.conan/remotes.json
ERROR: libcheck/0.15.2: 'settings.compiler' value not defined

Try to create the default Conan profile manually:

conan profile new --detect default

If it doesn't help, then try to manually add compiler, compiler.version and compiler.libcxx values in the default Conan profile (~/.conan/profiles/default). For example:

conan profile update settings.compiler=gcc default
conan profile update settings.compiler.version=7 default
conan profile update settings.compiler.libcxx=libstdc++ default

Rust compiler shows errors

Please ensure you are using the latest stable version:

rustup update stable

Other issues

A docker image can be used to run a reproducible environment. See instructions inside the Dockerfile. If the docker image doesn't work, please raise an issue.

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.