rust-crystal-ffi-example

Version, currently master branch1 version
  • master branchlatestMar 5, 2023

github.com/LePichu/rust-crystal-ffi-example

Example demonstrating how to use Rust from Crystal!

7 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  rust-crystal-ffi-example:
    github: LePichu/rust-crystal-ffi-example
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.6.0-dev
License
MIT
Author
LePichu <ishat.prsnl65844@gmail.com>
Target
  • rust-crystal-ffi-example from src/rust-crystal-ffi-example.cr

Dependencies

This version declares no dependencies.

README

# Rust to Crystal FFI Example.
This is a demo repository showing how to use Rust with Crystal.

## Prerequisites:
- [Rust](https://rust-lang.org)
- [Crystal](https://crystal-lang.org)

## Running Locally:
- Clone the repository to your local machine.
- Run `cargo build; shards run` to build and execute the example.

## How does it work?
This example does what Crystal needs, C ABI functions. We are exposing Rust code to C ABI which is then picked up by Crystal to use.