Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final changes to move to noirenberg #90

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/noirenberg.webp
Binary file not shown.
48 changes: 48 additions & 0 deletions .github/workflows/noirenberg_nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Nightly Noirenberg drift test

on:
# Giving ourselves a way to trigger this manually
workflow_dispatch:
schedule:
# Run a nightly release at 2 AM UTC
- cron: '0 2 * * *'
pull_request:

jobs:
test-noirenberg-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# - name: Set up bun
# uses: oven-sh/setup-bun@v1

# - name: Get latest stable version of Noir
# id: get-stable
# run: |
# VERSIONS_MAP=$(node ./.github/scripts/latest.js)
# echo "Versions out of script: $VERSIONS_MAP"

# STABLE=$(echo "$VERSIONS_MAP" | jq -c '.[]')
# echo "::set-output name=stable::$STABLE"

- name: Set up path
run: |
echo "${HOME}/.nargo/bin" >> $GITHUB_PATH
echo "${HOME}/.bb/bin" >> $GITHUB_PATH

- name: Run noirenberg install script
run: |
curl -L noiren.be | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

echo "$PATH"
source /home/runner/.bashrc
noirenberg
which noirenberg

- name: Check noir and barretenberg versions
run: |
echo "Noir version: $(noir --version)"
echo "Barretenberg version: $(bb --version)"
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode
.DS_Store

node_modules
bun.lockb

.github
.devcontainer
npx.ts
bin/*.ts
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Noir Starters
![noirenberg](./.github/noirenberg.webp)

This is a reference repo to help you get started with writing zero-knowledge circuits with [Noir](https://noir-lang.org/).
# Noirenberg

Noirenberg is a CLI tool that helps you get started with Noir and Barretenberg. It provides a simple interface to install Noir and Barretenberg, and to create new Noir projects.

Each project is an example you can use as template. Feel free to mix them in order to find the best combination of technology that suits your needs.

## Getting started

If you have [node](https://nodejs.org/en/download) installed, just open a terminal and run:
Run:

```bash
npx create-noir
curl -L noiren.be | bash
```

This will install Noirenberg globally on your system. You can now use the `noirenberg` command to install Noir and Barretenberg.

### Templates

Run `noirenberg new` to create a new Noir project. You can choose between two templates:

- Foundry: [`./with-foundry`](./with-foundry)
- Vite + Hardhat: [`./vite-hardhat`](./vite-hardhat)

Expand Down
8 changes: 3 additions & 5 deletions bin/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ export function sourceShellConfig() {
const shell = execSync('echo $SHELL', { encoding: 'utf-8' }).trim();

if (shell.includes('bash')) {
execSync('source ~/.bashrc', { stdio: 'inherit' });
process.env.PATH = execSync('echo $PATH', { encoding: 'utf-8' }).trim();
} else if (shell.includes('zsh')) {
execSync(`zsh -c "source ~/.zshrc"`, { stdio: 'inherit' });
process.env.PATH = execSync('zsh -c "echo $PATH"', { encoding: 'utf-8' }).trim();
} else if (shell.includes('fish')) {
execSync(`fish -c "source ~/.config/fish/config.fish"`, { stdio: 'inherit' });
} else {
throw new Error('Unsupported shell environment');
process.env.PATH = execSync('fish -c "echo $PATH"', { encoding: 'utf-8' }).trim();
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "noirenberg",
"version": "0.1.1",
"version": "0.1.5",
"type": "module",
"description": "This repo contains starter projects using Noir and Barretenberg, together with a CLI tool to help you get started.",
"bin": "npx.js",
Expand Down
Loading