binding a mojo
version of rust uuid.
Project | Package | Rank | Description |
---|---|---|---|
✅ uuid-ffi | libuuid_ffi | ⭐️⭐️⭐️ | uuid-rs ffi |
✅ uuid-gen | * | ⭐️ | generate mojo abi from uuid-ffi-core |
✅ uuid-mojo | uuid_mojo | ⭐️ | uuid-mojo package |
- Add the
better-ffi, better-mojo
channel to yourmojoproject.toml
, e.g:[project] channels = ["conda-forge", "https://conda.modular.com/max", "https://repo.prefix.dev/better-ffi", "https://repo.prefix.dev/better-mojo", ]
or use magic:
magic project channel add "https://repo.prefix.dev/better-ffi"
magic project channel add "https://repo.prefix.dev/better-mojo"
- add
uuid
to yourdependencies
magic add uuid_mojo
magic add libuuid_ffi
# pixi add libuuid_ffi
-
api:
from uuid_mojo import new_v4, new_v7, new_v4_2, version
fn main():
var v = version()
print(v)
print(new_v4())
print(new_v4_2())