#open-source #local-file #refactoring #oshw #open-source-hardware #open-hardware

sliderule

Encapsulates an implementation of the Distributed OSHW (Open Source Hardware) Framework (DOF) being developed by Mach 30

3 unstable releases

Uses old Rust 2015

0.2.1 Mar 20, 2019
0.2.0 Mar 11, 2019
0.1.0 Mar 5, 2019

#751 in Hardware support

Apache-2.0

120KB
2K SLoC

sliderule-rs

Travis Build Status Appveyor Build Status codecov

Introduction

This Rust crate encapsulates an implementation of the Distributed OSHW (Open Source Hardware) Framework DOF being developed by Mach 30.

Sliderule wraps the git and npm commands and uses them to manage DOF/Sliderule projects, both on the local file system, and on a remote server. At this time only structure management is provided, there is no capability to render models for documentation like assembly instructions out into their distributable form.

Central to understanding Sliderule is the concept of local and remote components. Local components are stored with a project, which is the top-level, enclosing component. Local components do not have a repository associated with them, they are only stored in the components directory of a project. Remote components, on the other hand, are stored in a remote repository, and are only installed into the local file system if the user requests it. Remote components are intended to be shared, local components are intended to only be used within their parent project. A local component can be converted into a remote component later, if desired.

The following is a list of the major operations available through this crate.

  • create - Creates a top level component unless creating a component inside of an existing component. In that case the new component is placed within the components directory of the parent "project" component.
  • add - Adds a remote component from a repository into the node_modules directory of the current component.
  • download - Downloads a copy of a component form a remote repository.
  • update - Downloads the latest changes to the component and/or its remote components (dependencies)
  • remove - Removes a component, whether it is local or remote.
  • upload - Uploads component changes on the local file system to its remote repository.
  • refactor - Converts a local component to a remote component so that it may be more easily shared.

There are also various helper functions to do things like getting what level a component is in a hierarchy and compiling the licenses of all components in a project.

API

This readme is just a general overview. The API documentation for this crate is available on crates.io.

Running Tests

If Rust is installed, running the following command will execute the tests.

cargo test -- --test-threads=1

Dependencies

~8–18MB
~243K SLoC