Socket
Socket
Sign inDemoInstall

private-voting

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    private-voting

This library implements an API for running privacy-preserving ballots. The library can be compiled to WASM, making it suitable for use within a browser application (for Cryptosim), as well as part of the flight software.


Version published
Maintainers
1
Created

Readme

Source

Private Voting

This library implements an API for running privacy-preserving ballots. The library can be compiled to WASM, making it suitable for use within a browser application (for Cryptosim), as well as part of the flight software.

Installing prerequisites

Prerequisites include

  • cargo
  • wasm-pack

cargo can be installed using rustup. Follow the installation instructions on https://www.rust-lang.org/tools/install.

Once cargo is installed, wasm-pack can be installed by running

$ cargo install wasm-pack

Building and testing

To run the unit tests, execute

$ cargo test

To build the WASM target and its JS bindings, run

$ wasm-pack build --target web

The WASM target and JS bindings will then be placed in a pkg directory.

Testing in a browser

To run unit tests in a browser, execute

$ wasm-pack test --chrome

To test calling the compiled WASM from Javascript code, there is a simple HTML under the html directory, named test.html. It has to be served over HTTP and not just opened directly as a file in the browser, since otherwise, CORS policies will block importing the Javascript file with the WASM bindings.

Generating documentation

To build the documentation for the private_voting library, execute

 $ cargo doc
 

which outputs the documentation in HTML format under target/doc.

FAQs

Last updated on 16 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc