JordanShurmer / solid-rust

A rust implementation of solid/solid-spec
14 stars 4 forks source link

Solid Rust

A SoLiD server implemented in rust.

https://github.com/JordanShurmer/solid-rust/actions?query=workflow%3A%22nightly+rust+test%22 https://github.com/JordanShurmer/solid-rust/actions?query=workflow%3A%22beta+rust+test%22 https://github.com/JordanShurmer/solid-rust/actions?query=workflow%3A%22stable+rust+test%22

Status

Work (barely) In Progress. Not usable at all.

See the issues and Milestones to get an idea of the on going work.

HTTP Related Conformance

LDP Related Conformance

There doesn't seem to be any already existing LDP servers in Rust, so this is from scratch.

Miscellaneous Conformance

Web Access Control

Architecture

This is set up as a Cargo Workspace. The workspace parent crate is here, and the server crate is a member.

This parent crate is the CLI binary which is a very minimal wrapper around everything in ther server crate. The server crate is the actual application.

The gist of the code structure is as follows: there is a module for each of the major specs that are involved in a Solid server

More TBD.

Running the server

Currently there are no pre-build binaries. To run the server you must run it from source using cargo.

# clone the repo
cd solid-rust
cargo run # [-- -p port-number]

Tests

Tests are run by running Postman's newman from within a cargo integration test. The tests will start the server on port 7171, then execute various requests against 127.0.0.1:7171.

Unfortunately, this means you have to have [newman] installed. npm install -g newman. Alternatively, you can install the man Postman client and import the test suite and run it there.

More on using Postman for tests here.

Running the tests

cd solid-rust/server
cargo test

Writing tests

When it makes sense, simply write unit tests directly in the rust source code like normal.

Intergation tests are written in nodejs, using postmam. The best way to write more integration tests is to use Postman. You can import the test suite, add your own requests/tests scripts, then export back into the repo.

Contributing

Contributions are welcome!

One major contribution we need is json-ld support. I haven't found any existing rust crate for interacting with rdf through json-ld.

Guidelines

Resources

Sepcs