Itamar Turner-Trauring on Nostr: Writing a Rust extension for Python is surprisingly simple: the Maturin packaging ...
Writing a Rust extension for Python is surprisingly simple: the Maturin packaging tool makes it really easy to get started, as it initializes a full working project template for you, and PyO3 gives you access to the full power of Python from Rust.
I wrote an article demonstrating a simple example, and then how I optimize it to run even faster.
https://pythonspeed.com/articles/intro-rust-python-extensions/#python #rust
Published at
2024-09-16 13:36:02Event JSON
{
"id": "8b1d83427f4b63fec143f282be06e16a5af8be0544e85d172ebcea8a3d5d915a",
"pubkey": "fc6f873f819068577e57a7e99f3f825e465b64545d5ba633faa79d5e68f4efd3",
"created_at": 1726493762,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"t",
"rust"
],
[
"proxy",
"https://hachyderm.io/users/itamarst/statuses/113147495229632896",
"activitypub"
]
],
"content": "Writing a Rust extension for Python is surprisingly simple: the Maturin packaging tool makes it really easy to get started, as it initializes a full working project template for you, and PyO3 gives you access to the full power of Python from Rust.\n\nI wrote an article demonstrating a simple example, and then how I optimize it to run even faster.\n\nhttps://pythonspeed.com/articles/intro-rust-python-extensions/\n\n#python #rust",
"sig": "eb081a357e2fc1bda0b361316330e45e011c783050363319e0e8d5305ac62ebbe1f00ef762947034553f344ca09a2858c79919b21ce4e90d7d1e3f02b9d5bccb"
}