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
Update architecture.md with correct paths and links
- Fix file paths to reflect crates/ directory structure
- Update GitHub permalink references to current commit
- Remove trailing slashes from package names
- Use archive.org for broken desosa.nl link
- Change master to main branch reference
Copy file name to clipboardExpand all lines: architecture/architecture.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,16 +73,16 @@ The main entry point of RustPython is located in `src/main.rs` and simply forwar
73
73
For each of the three components, the entry point is as follows:
74
74
75
75
- Parser: The Parser is located in a separate project, [RustPython/Parser][10]. See the documentation there for more information.
76
-
- Compiler: `compile`, located in [`vm/src/vm/compile.rs`][11], this eventually forwards a call to [`compiler::compile`][12].
77
-
- VM: `run_code_obj`, located in [`vm/src/vm/mod.rs`][13]. This creates a new frame in which the bytecode is executed.
76
+
- Compiler: `compile`, located in [`crates/vm/src/vm/compile.rs`][11], this eventually forwards a call to [`compiler::compile`][12].
77
+
- VM: `run_code_obj`, located in [`crates/vm/src/vm/mod.rs`][13]. This creates a new frame in which the bytecode is executed.
78
78
79
79
## Components
80
80
81
81
Here we give a brief overview of each component and its function. For more details for the separate crates please take a look at their respective READMEs.
82
82
83
83
### Compiler
84
84
85
-
This component, implemented as the `rustpython-compiler/` package, is responsible for translating a Python source file into its equivalent bytecode representation. As an example, the following Python file:
85
+
This component, implemented as the `rustpython-compiler` package, is responsible for translating a Python source file into its equivalent bytecode representation. As an example, the following Python file:
86
86
87
87
```python
88
88
deff(x):
@@ -111,7 +111,7 @@ The functionality for parsing resides in the RustPython/Parser project. See the
111
111
112
112
### VM
113
113
114
-
The Virtual Machine (VM) is responsible for executing the bytecode generated by the compiler. It is implemented in the `rustpython-vm/` package. The VM is currently implemented as a stack machine, meaning that it uses a stack to store intermediate results. In the `rustpython-vm/` package, additional sub-components are present, for example:
114
+
The Virtual Machine (VM) is responsible for executing the bytecode generated by the compiler. It is implemented in the `rustpython-vm` package. The VM is currently implemented as a stack machine, meaning that it uses a stack to store intermediate results. In the `rustpython-vm` package, additional sub-components are present, for example:
115
115
116
116
- builtins: the built in objects of Python, such as `int` and `str`.
117
117
- stdlib: parts of the standard library that contains built-in modules needed for the VM to function, such as `sys`.
@@ -158,7 +158,7 @@ The RustPython executable/REPL (Read-Eval-Print-Loop) is implemented here, which
158
158
Some things to note:
159
159
160
160
- The CLI is defined in the [`run` function of `src/lib.rs`][16].
161
-
- The interface and helper for the REPL are defined in this package, but the actual REPL can be found in `vm/src/readline.rs`
161
+
- The interface and helper for the REPL are defined in this package, but the actual REPL can be found in `crates/vm/src/readline.rs`
162
162
163
163
### WASM
164
164
@@ -169,18 +169,18 @@ Crate for WebAssembly build, which compiles the RustPython package to a format t
169
169
Integration and snippets that test for additional edge-cases, implementation specific functionality and bug report snippets.
0 commit comments