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.2.tar.gz (94.7 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.2-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bridgeit-0.1.2.tar.gz
  • Upload date:
  • Size: 94.7 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.2.tar.gz
Algorithm Hash digest
SHA256 d164016b197a74c45f552d27efbebac0e952354bebce45212d4d947b42dddb8e
MD5 51e5282c7d76162df39313673671466c
BLAKE2b-256 f0a6e01937a108f62574d037c57f6ae18d6684ebc9362373c8d7d41252a1cc1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bridgeit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06cd20cca369b7d9dc4c1d5e2f3bb16c5da297bd5f6ace250c6732841ae7a5ea
MD5 17258f7c6a5b2b00dbb63e228ad3ca2b
BLAKE2b-256 f152d878df06b61c9ee4e05bae0c9efe8b9d3966eac35060c1fdcedb4876c66f

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