Skip to content

Instantly share code, notes, and snippets.

@allsey87
allsey87 / python_plugin.rs
Last active April 20, 2024 00:12
Integrating RustPython into a Bevy App
use bevy::prelude::{AppBuilder, Entity, With, World};
use bevy::ecs::system::IntoExclusiveSystem;
use rustpython_vm::{self as vm, builtins::PyCode, PyRef, scope::Scope};
pub(crate) struct PythonPlugin;
pub(crate) struct Script(pub String);
fn compile(world: &mut World) {
let interpreter = world
{
"doctype": "tile",
"content": {
"$id": "http://niftyschema.com/opensea.json",
"type": "object",
"title": "OpenSea NFT Metadata Schema",
"$schema": "http://json-schema.org/draft-07/schema",
"default": {},
"examples": [
{
@kristofferh
kristofferh / git-export
Created December 7, 2011 13:01
"Export" a git repository to zip file
git archive --format zip --output /full/path/to/zipfile.zip master