{"id":17397775,"url":"https://github.com/bltavares/camarim","last_synced_at":"2026-05-07T07:39:14.031Z","repository":{"id":62438778,"uuid":"252877340","full_name":"bltavares/camarim","owner":"bltavares","description":"Easy setup logging on FFI libs for mobile devices","archived":false,"fork":false,"pushed_at":"2020-04-04T03:38:46.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T05:52:40.864Z","etag":null,"topics":["android","ffi","ios","logging","rust"],"latest_commit_sha":null,"homepage":null,"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/bltavares.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":"2020-04-04T00:57:25.000Z","updated_at":"2020-10-27T21:41:23.000Z","dependencies_parsed_at":"2022-11-01T21:48:57.947Z","dependency_job_id":null,"html_url":"https://github.com/bltavares/camarim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bltavares%2Fcamarim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bltavares%2Fcamarim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bltavares%2Fcamarim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bltavares%2Fcamarim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bltavares","download_url":"https://codeload.github.com/bltavares/camarim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242256226,"owners_count":20097937,"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":["android","ffi","ios","logging","rust"],"created_at":"2024-10-16T14:15:48.589Z","updated_at":"2026-05-07T07:39:09.010Z","avatar_url":"https://github.com/bltavares.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# camarim\n\nEasy setup logging on FFI libs for mobile devices\n\n\u003e camarim: (pt-br) Backstage room on the theater where actors get ready to show up on stage\n\n---\n\nThis crate let you easilly get logging available for FFI libraries, specially when targeting Android and iOS devices.\n\n## Installation\n\n### Add the library as an optional dependency\n\nYou can use the library as an optional dependency, to use only during debug.\nOn `Cargo.toml` add:\n\n```toml\n[dependencies.camarim]\nversion = '0.1.0'\noptional = true\n\n[features]\nlogs = ['camarim']\n```\n\n### Add the library on the root of the FFI crate\n\n```rust\n#[cfg(feature = \"logs\")]\ncamarim::install!();\n```\n\n### Build your library with the feature enabled\n\n```sh\ncross build --features logs --target x86_64-linux-android\n```\n\n### Call the setup to intialize the logger\n\nOn the FFI side, use the `camarim_setup_logger` function to setup the logging.\n\nFor example, in `Dart`:\n\n```dart\nimport 'dart:ffi' as ffi;\n\nfinal ffi.DynamicLibrary _myLib = Platform.isAndroid\n    ? ffi.DynamicLibrary.open(\"libmylib.so\")\n    : ffi.DynamicLibrary.process();\n\n\n/// Find `camarim_setup_logger` to call it during your app startup\nfinal startLogger = _myLib.lookupFunction\u003cffi.Void Function(), void Function()\u003e(\"camarim_setup_logger\");\n\n/// ... declare the your crate exposed functions\n```\n\n## TODO\n\n- [ ] WASM and Browser logging?\n- [ ] Provide ways to customize log level?\n\n## Relevant issues\n\n- [Re-export C symbols](https://github.com/rust-lang/rfcs/issues/2771) - to remove macro needs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbltavares%2Fcamarim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbltavares%2Fcamarim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbltavares%2Fcamarim/lists"}