rust-spice 0.3.0

NASA/NAIF Spice toolkit actually usable on Rust
docs.rs failed to build rust-spice-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rust-spice-0.7.8

rust-spice

logo image

crate badge doc badge license badge pre-commit badge

NASA/NAIF Spice toolkit actually usable on Rust


Rational | Installation | License


Rational

Another crate already exist for wrapping C spice: spice-sys. The motivation behind the creation of rust-spice was 1) the need to access the complete spice API from Rust and 2) the need to have a Rust layer to feel natural to use for Rust users.

Complete API

spice-sys does not use bindgen to wrap which is error-prone and does not provide a complete API. The description of spice-sys says:

Currently, it provides only the most common API calls as outlined here.

This boosted me to build a complete C spice wrapper.

Rust interface

spice-sys does not provide a Rust user-friendly interface, which constrains the user to use FFI/libc tools to convert strings, floats and array to C types and using unsafe scopes.

I wanted to use spice from Rust without feeling it is a C wrapper, for quicker and simplier usage in my crates.

S/O

Many thanks to the author of the crate spice-sys for the idea of the wget script to avoid crate upload, I included your script copyrighted under your MIT license and added some modifications that I listed carefully.

Installation

Add the dependency rust-spice to your Cargo.toml:

...
[dependencies]
rust-spice = "0.3.0"

License

Licensed under the Apache License, Version 2.0.