Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/storswiftlabs/python2noir
Generate Noir code through python
https://github.com/storswiftlabs/python2noir
Last synced: 4 months ago
JSON representation
Generate Noir code through python
- Host: GitHub
- URL: https://github.com/storswiftlabs/python2noir
- Owner: storswiftlabs
- Created: 2023-07-25T02:59:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-14T10:01:40.000Z (over 1 year ago)
- Last Synced: 2024-04-14T02:08:18.675Z (7 months ago)
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 9
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-noir - Python2Noir - From Python to Noir language transpiler (Get Coding / Dev Tools)
README
# Python2Noir
Generate Noir code through python.## Description
Easy to quickly convert python libraries to Noir contracts
## Directory structure
- tests: Testcase for transpiler
- transpiler: Python2Noir transpiler, include Noir language diffent module
- context: Process the transformation context to build the complete Noir file
- core_module: Include some core components such as struct and function
- others_module: Include non-core statements
- sub_module: Include some base components such as primitive type sign and key words
- util: tools such as code format and logger
## Build guide- Python 3.7+
- Anaconda## Import package
### linux
```shell
pip install setuptools
git clone https://github.com/storswiftlabs/python2noir.git
python setup.py sdist
pip install ./dist/python2noir-0.1.tar.gz
```
### windows
```shell
pip install setuptools
git clone https://github.com/storswiftlabs/python2noir.git
python setup.py bdist_wininst
# execute exe file
./python2noir-0.1.win-amd64.exe
```## Example
```shell
# clone repository
git clone https://github.com/storswiftlabs/python2noir.git
# execute testcase: python generated Noir code
python -m unittest tests/transpiler/context/test_context.py
```