https://github.com/booyaa/iso8601_validator
This is a proof of concept code to show how to expose validation functionality from a Rust crate [iso8601](https://crates.io/crates/iso8601) to perl!
https://github.com/booyaa/iso8601_validator
ffi iso8601 perl rust
Last synced: 2 months ago
JSON representation
This is a proof of concept code to show how to expose validation functionality from a Rust crate [iso8601](https://crates.io/crates/iso8601) to perl!
- Host: GitHub
- URL: https://github.com/booyaa/iso8601_validator
- Owner: booyaa
- License: mit
- Created: 2017-11-06T13:23:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T15:02:00.000Z (over 8 years ago)
- Last Synced: 2026-04-02T08:29:05.740Z (3 months ago)
- Topics: ffi, iso8601, perl, rust
- Language: Rust
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
README
# A better introduction to Rust FFI
This is a proof of concept code to show how to expose validation functionality from a Rust crate [iso8601](https://crates.io/crates/iso8601) to perl!
## Usage
This should work with Macs and Linux based environments. Also for perl FFI binding I'm using `FFI::Raw` module rather than xs.
- Install rust using rustup, accept the defaults and follow instructions: `curl https://sh.rustup.rs -sSf | sh`
- Clone the repo `git clone git@github.com:booyaa/iso8601_validator.git`
- Go to the `iso8601_validator` directory
- Build `cargo build`
- Install FFI::Raw `perl -MCPAN -e 'install FFI::Raw'
- Test code using perl script: `src/main.pl`
The Python code is @shepmaster's excellent [The Rust FFI Omnibus](http://jakegoulding.com/rust-ffi-omnibus/).
The awful perl code I claim as my own.
# Code of Conduct
Please see code-of-conduct.md which is based on [Contributor Covenant v1.4.1](https://www.contributor-covenant.org/)
# Contributions
Are always welcome provided you adhere to the Code of Conduct
# Copyright / License
- Copyright Mark Sta Ana 2017.
- License is MIT (as per dependency).
Using module [iso8601](https://crates.io/crates/iso8601) copyright:
- Hendrik Sollich
- Jan-Erik Rediger