Rust Python Objects
use python like objects in rust, such as list
, for now.
have the simplicity
and performance
together.
be happy.
Showcase (example code)
// the crate name is 'python-objects'
// because there is another crate out there with `python` name
// but the lib.rs (library crate of this crate) its called `python`
// so you can import like this
extern crate python;
// use everything from python
use *;
output
# the python list
['1', '2', '3', '1', '2', '3', 123, 123.123, 123.123, 123.123, 'asdasd', ['a', 'n', 'd', 'r', 'e', 'w'], 'python string']
# the length
13
as you can see the list contains char
, float (f32)
, integer (i32)
, a rust string
, another python list
, and a python string
this is just bare bones
and experimental
, more features will come soon. stay still!
why ?
why not. because python concepts are very cool, but python is slow..
so what if we could use python objects in rust and have the same experience as in python (almost) ?
and things are getting much better. rust has zero-cost abstractions
, meaning that every struct and trait will be deleted at compile time
and they will be gone at runtime
.
so we are getting python objects in rust with performance
and simplity
.
TODO
check TODO.md
CONTRIBUTING
-
fork the repo on github
-
clone your repo to local
git clone https://github.com/<your-username>/rust-python-objects
- make your branch
git checkout -b <username>-<branch-name>
note: the branch name can be whatever you want, but would be more suggestive to be a username and feature name
-
make some changes in the source code
-
add + commit + push changes to your forked repo
add
git add .
commit
git commit -m 'created the best feature every. feels so good to contribute to open source'
push
git push github <your-branch-name>
-
go to github to your forked repo and send a pull request
-
wait for approval :)
NOTE
note for the user and developer
right now this project is very minimal, it will grow, the idea just came to my mind some days ago (on 21.02.2022) and the first implementation was done at 4 AM (23.02.2022) with some adrenaline.
so for now dont expect too much of this crate
peace to you!