You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,11 +29,11 @@ All types of contributions are encouraged and valued. See the [Table of Contents
29
29
30
30
> If you want to ask a question, we assume that you have read the available [Documentation](docs/).
31
31
32
-
Before you ask a question, it is best to search for existing [Issues](https://github.com/lambdaclass/cairo-rs/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
32
+
Before you ask a question, it is best to search for existing [Issues](https://github.com/lambdaclass/cairo-vm/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
33
33
34
34
If you then still feel the need to ask a question and need clarification, we recommend the following:
35
35
36
-
- Open an [Issue](https://github.com/lambdaclass/cairo-rs/issues/new).
36
+
- Open an [Issue](https://github.com/lambdaclass/cairo-vm/issues/new).
37
37
- Provide as much context as you can about what you're running into.
38
38
- Provide project and platform versions (cairo language, rust compiler, Python, etc), depending on what seems relevant.
39
39
@@ -73,7 +73,7 @@ A good bug report shouldn't leave others needing to chase you up for more inform
73
73
74
74
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
75
75
76
-
- Open an [Issue](https://github.com/lambdaclass/cairo-rs/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
76
+
- Open an [Issue](https://github.com/lambdaclass/cairo-vm/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
77
77
- Explain the behavior you would expect and the actual behavior.
78
78
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
79
79
- Provide the information you collected in the previous section.
@@ -96,19 +96,19 @@ This section guides you through submitting an enhancement suggestion for CONTRIB
96
96
97
97
- Make sure that you are using the latest version.
98
98
- Read the [documentation](docs/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
99
-
- Perform a [search](https://github.com/lambdaclass/cairo-rs/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
99
+
- Perform a [search](https://github.com/lambdaclass/cairo-vm/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
100
100
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
101
101
102
102
103
103
#### How Do I Submit a Good Enhancement Suggestion?
104
104
105
-
Enhancement suggestions are tracked as [GitHub issues](https://github.com/lambdaclass/cairo-rs/issues).
105
+
Enhancement suggestions are tracked as [GitHub issues](https://github.com/lambdaclass/cairo-vm/issues).
106
106
107
107
- Use a **clear and descriptive title** for the issue to identify the suggestion.
108
108
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
109
109
-**Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
110
110
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
111
-
-**Explain why this enhancement would be useful** to most cairo-rs users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
111
+
-**Explain why this enhancement would be useful** to most cairo-vm users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
@@ -27,7 +27,7 @@ A faster and safer implementation of the Cairo VM in Rust
27
27
-[Getting Started](#-getting-started)
28
28
-[Dependencies](#dependencies)
29
29
-[Usage](#-usage)
30
-
-[Running cairo-rs](#running-cairo-rs)
30
+
-[Running cairo-vm](#running-cairo-vm)
31
31
-[Using hints](#using-hints)
32
32
-[Running a function in a Cairo program with arguments](#running-a-function-in-a-cairo-program-with-arguments)
33
33
-[WebAssembly Demo](#webassembly-demo)
@@ -46,7 +46,7 @@ A faster and safer implementation of the Cairo VM in Rust
46
46
47
47
## ⚠️ Disclaimer
48
48
49
-
🚧 `cairo-rs` is still being built therefore breaking changes might happen often so use it at your own risk. 🚧
49
+
🚧 `cairo-vm` is still being built therefore breaking changes might happen often so use it at your own risk. 🚧
50
50
Cargo doesn't comply with [semver](https://semver.org/), so we advise to pin the version to 0.1.0. This can be done adding `cairo-vm = "0.1.0"` to your Cargo.toml
51
51
52
52
## 📖 About
@@ -81,7 +81,7 @@ These dependencies are only necessary in order to run the original VM, compile C
81
81
82
82
## 🚀 Usage
83
83
84
-
### Adding cairo-rs as a dependency
84
+
### Adding cairo-vm as a dependency
85
85
86
86
You can add the following to your rust project's `Cargo.toml`:
87
87
@@ -91,7 +91,7 @@ cairo-vm = { version = '0.7.0', features = ["lambdaworks-felt"] }
91
91
92
92
The `features = ["lambdaworks-felt"]` part adds usage of [`lambdaworks-math`](https://github.com/lambdaclass/lambdaworks) as the backend for `Felt252`. This improves performance by more than 20%, and will be the default in the future.
93
93
94
-
### Running cairo-rs from CLI
94
+
### Running cairo-vm from CLI
95
95
96
96
To run programs from the command line, first compile the repository from the cairo-vm-cli folder:
97
97
@@ -120,15 +120,15 @@ The flag `--layout` determines which builtins can be used. More info about layou
120
120
To sum up, the following code will get you from zero to running a Cairo program:
@@ -137,12 +137,12 @@ Currently, as this VM is under construction, it's missing some of the features o
137
137
138
138
There are two ways to use non-standard hints in this VM:
139
139
140
-
- Extend the cairo-rs code and build your own binary using the interface [HintProcessor](docs/hint_processor/README.md).
141
-
- Use [cairo-rs-py](https://github.com/lambdaclass/cairo-rs-py) which supports running any hint in a Python interpreter.
140
+
- Extend the cairo-vm code and build your own binary using the interface [HintProcessor](docs/hint_processor/README.md).
141
+
- Use [cairo-vm-py](https://github.com/lambdaclass/cairo-vm-py) which supports running any hint in a Python interpreter.
142
142
143
143
### Running a function in a Cairo program with arguments
144
144
145
-
When running a Cairo program directly using the Cairo-rs repository you would first need to prepare a couple of things.
145
+
When running a Cairo program directly using the Cairo-vm repository you would first need to prepare a couple of things.
146
146
147
147
1. Specify the Cairo program you want to run
148
148
@@ -173,7 +173,7 @@ When running a Cairo program directly using the Cairo-rs repository you would fi
173
173
cairo_runner.initialize_segments(&mutvm, None);
174
174
```
175
175
176
-
When using cairo-rs with the Starknet devnet there are additional parameters that are part of the OS context passed on to the `run_from_entrypoint` method that we do not have here when using it directly. These parameters are, for example, initial stacks of the builtins, which are the base of each of them and are needed as they are the implicit arguments of the function.
176
+
When using cairo-vm with the Starknet devnet there are additional parameters that are part of the OS context passed on to the `run_from_entrypoint` method that we do not have here when using it directly. These parameters are, for example, initial stacks of the builtins, which are the base of each of them and are needed as they are the implicit arguments of the function.
177
177
178
178
```rust
179
179
let_var=cairo_runner.run_from_entrypoint(
@@ -190,7 +190,7 @@ When using cairo-rs with the Starknet devnet there are additional parameters tha
190
190
191
191
### WebAssembly Demo
192
192
193
-
A demo on how to use `cairo-rs` with WebAssembly can be found
193
+
A demo on how to use `cairo-vm` with WebAssembly can be found
Note before running the benchmark suite: the benchmark named [iai_benchmark](https://github.com/lambdaclass/cairo-rs/blob/8dba86dbec935fa04a255e2edf3d5d184950fa22/Cargo.toml#L59) depends on Valgrind. Please make sure it is installed prior to running the `iai_benchmark` benchmark.
218
+
Note before running the benchmark suite: the benchmark named [iai_benchmark](https://github.com/lambdaclass/cairo-vm/blob/8dba86dbec935fa04a255e2edf3d5d184950fa22/Cargo.toml#L59) depends on Valgrind. Please make sure it is installed prior to running the `iai_benchmark` benchmark.
219
219
220
220
Run the complete benchmark suite with cargo:
221
221
@@ -257,8 +257,8 @@ You can find more detailed instructions in the [CONTRIBUTING.md](CONTRIBUTING.md
257
257
258
258
## 🌞 Related Projects
259
259
260
-
-[starknet_in_rust](https://github.com/lambdaclass/starknet_in_rust): implementation of Starknet in Rust, powered by the cairo-rs VM.
261
-
-[cairo-rs-py](https://github.com/lambdaclass/cairo-rs-py): Bindings for using cairo-rs from Python code.
260
+
-[starknet_in_rust](https://github.com/lambdaclass/starknet_in_rust): implementation of Starknet in Rust, powered by the cairo-vm.
261
+
-[cairo-vm-py](https://github.com/lambdaclass/cairo-vm-py): Bindings for using cairo-vm from Python code.
#### Step 2: Code the implementation of your custom hint (Using the helpers and structures described in the sections below)
@@ -58,7 +58,7 @@ let hint = HintFunc(Box::new(print_a_hint));
58
58
```
59
59
60
60
#### Step 3: Instantiate the BuiltinHintProcessor and add your custom hint implementation
61
-
Import the BuiltinHintProcessor from cairo-rs, instantiate it using the `new_empty()` method and the add your custom hint implementation using the method `add_hint`
61
+
Import the BuiltinHintProcessor from cairo-vm, instantiate it using the `new_empty()` method and the add your custom hint implementation using the method `add_hint`
You can also create a dictionary of HintFunc and use the method `new()` to create a BuiltinHintProcessor with a preset dictionary of functions instead of using `add_hint()` for each custom hint.
69
69
70
70
#### Step 4: Run your cairo program using BuiltinHintProcessor extended with your hint
71
-
Import the function cairo_run from cairo-rs, and run your compiled program
71
+
Import the function cairo_run from cairo-vm, and run your compiled program
0 commit comments