{"id":15061180,"url":"https://github.com/m4b/raml","last_synced_at":"2025-04-10T06:36:53.705Z","repository":{"id":62443555,"uuid":"91766648","full_name":"m4b/raml","owner":"m4b","description":"OCaml runtime and FFI bindings directly in Rust","archived":false,"fork":false,"pushed_at":"2017-05-19T06:51:20.000Z","size":25,"stargazers_count":79,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T07:40:41.093Z","etag":null,"topics":["ffi-bindings","ocaml","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m4b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-19T04:51:05.000Z","updated_at":"2024-10-25T21:11:57.000Z","dependencies_parsed_at":"2022-11-01T23:18:15.468Z","dependency_job_id":null,"html_url":"https://github.com/m4b/raml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Framl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Framl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Framl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Framl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m4b","download_url":"https://codeload.github.com/m4b/raml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248170887,"owners_count":21059271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffi-bindings","ocaml","rust"],"created_at":"2024-09-24T23:11:10.713Z","updated_at":"2025-04-10T06:36:53.648Z","avatar_url":"https://github.com/m4b.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![goats are actually the best animal ever invented](https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hausziege_04.jpg/480px-Hausziege_04.jpg)\n\n# Raml - Intelligent OCaml FFI in Rust\n\nDirect OCaml bindings without ever leaving Rust - no C stubs!\n\n(you still have to know how the C ffi bindings work; if you do, the macros are almost identical to the C ones in their naming and purpose)\n\nPlease see the example in `examples` for the Rust code in `rust` for the Rust code that OCaml code will call and the `ocaml` directory for the OCaml code that calls the Rust code.\n\nAlso, please bear with me as I'm trying to add more documentation and examples, but I am very busy; if you see something, don't hesitate to add a PR or issue, thanks :)\n\nA basic example demonstrates their usage:\n\n```rust\ncaml!(ml_beef, |parameter|, \u003clocal\u003e, {\n    let i = int_val!(parameter);\n    let res = 0xbeef * i;\n    println!(\"about to return  0x{:x} to OCaml runtime\", res);\n    local = val_int!(res);\n} -\u003e local);\n```\n\nThe macro takes care of _automatically_ declaring `CAMLparam` et. al, as well as `CAMLlocal` and `CAMLreturn`.\n\nIf you need more fine grained control, `caml_body!` and others are available.\n\n### Documentation\n\nhttps://docs.rs/raml/\n\n### Usage\n\nraml should work with a recent `rustc` (I test on 1.16), and _does not require nightly_.\n\nAdd to your `Cargo.toml`\n\n```toml\n[dependencies]\nraml = \"0.1.0\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4b%2Framl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm4b%2Framl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4b%2Framl/lists"}