Skip to content

🔬🦀 An experimental project to build a Rust package for RDF and Nanopublications with bindings to Python and JS (wasm)

License

Notifications You must be signed in to change notification settings

shashankmc/nanopub-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔬🦀 Nanopub rs

Lint and Test Deploy docs to GitHub Pages

A rust toolkit to sign and publish Nanopublications, with bindings to python and javascript (wasm).

Nanopub signing process

  • preliminary nanopub is created with blank space in URIs at the places where the trusty URI code will appear (normalized URI: http://purl.org/np/ARTIFACTCODE-PLACEHOLDER/, cf. code); this includes the signature part, except the triple that is stating the actual signature
  • preliminary nanopub is serialized in a normalized fashion (basically each quad on four lines with minimal escaping)
  • Signature is calculated on this normalized representation (cf. most of the process in the trusty-uri python lib, see also SignatureUtils and trusty-uri)
  • Signature triple is added
  • Trusty URI code is calculated on normalized representation that includes signature
  • Trusty URI code is added in place of all the occurrences of blank spaces in the URIs, leading to the final trusty nanopub

Run the library to test

cd try/
cargo build
cargo run

Checkout the README in the python and js folder for the instructions for each language

Generate docs

./scripts/docs-serve.sh

Useful links

https://github.com/briansmith/ring

https://github.com/Vanethos/rust-wasm-example-rsa

https://github.com/Harzu/wasm-rsa

https://github.com/frehberg/wasm-sign

Building artefacts for many targets: https://github.com/oxigraph/oxigraph/blob/main/.github/workflows/artifacts.yml

About

🔬🦀 An experimental project to build a Rust package for RDF and Nanopublications with bindings to Python and JS (wasm)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 77.2%
  • Shell 8.3%
  • HTML 7.9%
  • Python 6.6%