A modern Python library
Project description
bridgeit
An experimental hack to run other languages than python in solve.it.com.
Requirements
- Python 3.12+
- https://solve.it.com
Installation
!pip install -U bridgeit
How it Works
BridgeIt enables running non-Python languages in SolveIt notebooks through a three-step process:
-
Compiler Installation: Automatically installs language compilers and toolchains (e.g., evcxr for Rust, Mojo via pixi)
-
Kernelspec Registration: Registers Jupyter kernelspecs that define how to execute each language
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aba7c683da8ea49016a4c23b258b30bdb9fa5951d6cb06a75cb3d0fa298da63
|
|
| MD5 |
ca1fe62a2721e2581aafdbd06aeb1d55
|
|
| BLAKE2b-256 |
86e2111990651dfd74e894cd283c825714bfd28b6c6f06518fd74256d7440ab3
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7846122150394e098f4e25ff038fbce7e51b0739a0f14bfe3f9b5548a6f5b694
|
|
| MD5 |
5fcff80037a4837052be08d721d66772
|
|
| BLAKE2b-256 |
71a78ff538f6ca2deb15d17034209c6911d7a4b1cd4077ce27df9770debdf5ef
|