Skip to content

It's not completely clear how to embed RustPython #2371

@Kezii

Description

@Kezii

It's not sufficiently documented how to embed RustPython in an external project using crates.io crates, for example

rustpython-vm = { version = "0.1.2" }

in Cargo.toml fails to compile the hello_embed example

error[E0433]: failed to resolve: could not find `Interpreter` in `vm`
 --> src/main.rs:4:9
  |
4 |     vm::Interpreter::default().enter(|vm| {
  |         ^^^^^^^^^^^ could not find `Interpreter` in `vm`

error[E0433]: failed to resolve: could not find `compile` in `vm`
  --> src/main.rs:10:21
   |
10 |                 vm::compile::Mode::Exec,
   |                     ^^^^^^^ could not find `compile` in `vm`

error: aborting due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions