Home

Awesome

AltDSS-Rust

A crate with Rust bindings (currently based on bindgen) to AltDSS/DSS C-API, the alternative OpenDSS implementation from DSS-Extensions.

Initial tracking is done at https://github.com/dss-extensions/dss-extensions/issues/34
The issue tracker here will be used after the initial issue is closed.

The current milestones are:

  1. (DONE) Provide access to the classic API, organized to mimic the original OpenDSS COM classes (note that COM objects are not used on DSS-Extensions; COM is a Windows-only technology).

    • Expose all of the classic DSS C-API functions.
  2. Try the upcoming wrapper for the official OpenDSSDirect.DLL. The DLL was rewritten recently (but it's still Windows-only right now).

  3. Provide access to the new API, which exposes all DSS classes and functions more conveniently.

This project is then expected to allow using both the official OpenDSS, within its limitations, and the DSS-Extensions implementation (aka AltDSS/DSS C-API).


Current status

Pending tasks and decisions:

Getting started

Currently, this is not published to crates.io and there is no special handling for the DSS C-API binaries.

This could change shortly, so remember to check later.

Some direct instructions to get up and running (assuming Rust and tools are already installed):

(NOTE: this needs to be updated, but the general idea still applies)

mkdir altdss-tests
cd altdss-tests
wget -qO- https://github.com/dss-extensions/dss_capi/releases/download/0.14.3/dss_capi_0.14.3_linux_x64.tar.gz | tar zxv
git clone --depth=1 https://github.com/dss-extensions/electricdss-tst
git clone https://github.com/dss-extensions/altdss-rust
export LD_LIBRARY_PATH=`pwd`/dss_capi/lib/linux_x64
cd altdss-rust
cargo build
cargo run --example ieee13
cargo run --example list_props
cargo run --example parallel

Examples

Check some examples in the tests folder. These include basics, multithreading, and use of the properties API.