Giter Club home page Giter Club logo

noir-lib-demo's Introduction

Noir library Demo

A demo repo for showing how to publish a Noir library.

Notice in /.github/workflows/test.yml that it is really easy to incorporate automated testing to your library so you never release broken code. ๐Ÿ™‚ ๐Ÿš€

Create your own library

  1. Create a file called lib.nr in ./src containing the code for the Noir library. The functions in this file will be available to anyone that imports the library into their project.
  2. Create a release on Github. See these instructions.
  3. That's it! Anyone can now use your library in their Noir project.

Using the library

  1. Add the library to your Noir project dependencies in the Nargo.toml file.
[dependencies]
demo_lib = {tag = "v0.1", git = "https://github.com/critesjosh/noir-lib-demo"}
  1. Import the library into your Noir code.
use dep::std;
use dep::demo_lib;

fn main(){
    // ...
    let new_array = demo_lib::coordinates_to_u64_array(pub_key_x, pub_key_y);
    std::println(new_array[0]);
    // ...
}

Credit to @colinnielsen for the example function.

noir-lib-demo's People

Contributors

critesjosh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.