Skip to main content

A modern Python library

Project description

bridgeit

An experimental hack to run other languages than python in solve.it.com.

Requirements

Installation

!pip install -U bridgeit

How it Works

BridgeIt enables running non-Python languages in SolveIt notebooks through a three-step process:

  1. Compiler Installation: Automatically installs language compilers and toolchains (e.g., evcxr for Rust, Mojo via pixi)

  2. Kernelspec Registration: Registers Jupyter kernelspecs that define how to execute each language

  3. Cell Magic Binding: Creates IPython cell magics (e.g., %%rust, %%mojo) that bridge notebook cells to the installed kernels

When you use %%rust or %%mojo, BridgeIt sends your code to the appropriate kernel for execution and displays the results inline.

Usage

Quick Start

import bridgeit

# Show available commands
bridgeit.help()

# List supported languages
bridgeit.langs()

Rust Example

# Install Rust kernel
bridgeit.install("rust")

# Activate Rust magic
bridgeit.use("rust")
%%rust
fn main() {
    println!("Hello from Rust 🦀");
}
main()
%%rust
let value = 21;
println!("{}", value * 2);

Mojo Example

# Install Mojo kernel
bridgeit.install("mojo")

# Activate Mojo magic
bridgeit.use("mojo")
%%mojo
fn main():
    print("Hello from Mojo 🔥")
main()
%%mojo
alias value = 10
print(value * 3)

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bridgeit-0.1.3.tar.gz (95.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bridgeit-0.1.3-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file bridgeit-0.1.3.tar.gz.

File metadata

  • Download URL: bridgeit-0.1.3.tar.gz
  • Upload date:
  • Size: 95.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bridgeit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1aba7c683da8ea49016a4c23b258b30bdb9fa5951d6cb06a75cb3d0fa298da63
MD5 ca1fe62a2721e2581aafdbd06aeb1d55
BLAKE2b-256 86e2111990651dfd74e894cd283c825714bfd28b6c6f06518fd74256d7440ab3

See more details on using hashes here.

File details

Details for the file bridgeit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: bridgeit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bridgeit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7846122150394e098f4e25ff038fbce7e51b0739a0f14bfe3f9b5548a6f5b694
MD5 5fcff80037a4837052be08d721d66772
BLAKE2b-256 71a78ff538f6ca2deb15d17034209c6911d7a4b1cd4077ce27df9770debdf5ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page