Giter VIP home page Giter VIP logo

libspike-interfaces's Introduction

libspike-interfaces

libspike-interfaces is a C language API interface for the RISC-V ISA Simulator (Spike), designed to facilitate usage of Spike from other languages via Foreign Function Interface (FFI).

Overview

This project provides a set of C language functions and data structures that serve as a bridge between Spike and other programming languages. By using these interfaces, developers can seamlessly integrate Spike functionality into their projects without needing to directly interact with Spike's internals.

Features

  • FFI Compatibility: Designed for easy integration with other programming languages through Foreign Function Interface mechanisms.
  • Nix Build System: Utilizes the Nix package manager for easy dependency management and reproducible builds.
  • Example Applications: Includes example applications demonstrating how to use the libspike-interfaces library.

Getting Started

Set Up the Development Environment

We use nix flake as our primary build system. If you have not installed nix, install it following the guide, and enable flake following the wiki. Or you can try the installer provided by Determinate Systems, which enables flake by default.

Build the Library

To build the library, run:

nix build .#libspike_interfaces

The resulting shared library (libspike_interfaces.so) will be available in the result/lib.

Run & Test Example Code

You can run and test the C example code as follows:

nix build .#elfloader
./result/bin/elfloader ./resources/conv-mlir.elf

Alternatively, you can just run in one line:

nix run .#elfloader ./resources/conv-mlir.elf

And you can run and test the Rust example code as follows:

nix run .#rs_elfloader -- -e ./resources/conv-mlir.elf

Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request for any improvements or fixes you'd like to see.

License

This project is licensed under the Apache 2 License - see the LICENSE file for details.

libspike-interfaces's People

Contributors

clo91eaf avatar

Stargazers

LIU Yu avatar zhangtr avatar

Watchers

 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.