Skip to content

make adding a single module simpler for interpreter users#4792

Merged
youknowone merged 1 commit intoRustPython:mainfrom
youknowone:interp-add-native-module
Mar 21, 2024
Merged

make adding a single module simpler for interpreter users#4792
youknowone merged 1 commit intoRustPython:mainfrom
youknowone:interp-add-native-module

Conversation

@youknowone
Copy link
Copy Markdown
Member

while looking in discord chat, I found it is hard to add a single module to interpreter

Comment thread src/interpreter.rs
self.init_hooks.push(hook);
self
}
pub fn add_native_module(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a good idea to document this one then if users are really interested in it (ideally pointing to an example someplace).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for a nice advice, really.
I am sorry that I am currently barely maintaining the project and probably not going to finish it in near future.
I am going to merge this PR not because the advice is less useful but just because we eventually need to finish both the code and document. I had to finish at the moment, probably I shared example to the discord chat.

@youknowone
Copy link
Copy Markdown
Member Author

the clippy error is false-positive

@youknowone youknowone force-pushed the interp-add-native-module branch from 9220b2e to c65c2ff Compare June 14, 2023 08:48
@youknowone youknowone merged commit 3737f2a into RustPython:main Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants