philomena/native/philomena
dependabot[bot] 6a0bdbc7ca
Bump zip from 2.2.1 to 2.3.0 in /native/philomena
Bumps [zip](https://github.com/zip-rs/zip2) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: zip
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 00:11:41 +00:00
..
src Use lazy for domain set 2024-12-01 18:17:53 -05:00
Cargo.lock Bump zip from 2.2.1 to 2.3.0 in /native/philomena 2025-03-18 00:11:41 +00:00
Cargo.toml Bump zip from 2.2.1 to 2.3.0 in /native/philomena 2025-03-18 00:11:41 +00:00
README.md Add some specs and documentation, format 2021-09-29 22:09:21 -04:00

NIF for Elixir.Philomena.Native

To build the NIF module:

  • Make sure your projects mix.exs has the :rustler compiler listed in the project function: compilers: [:rustler] ++ Mix.compilers() If there already is a :compilers list, you should append :rustler to it.
  • Add your crate to the rustler_crates attribute in the `project function. See here.
  • Your NIF will now build along with your project.

To load the NIF:

defmodule Philomena.Native do
    use Rustler, otp_app: <otp-app>, crate: "philomena"

    # When your NIF is loaded, it will override this function.
    def add(_a, _b), do: :erlang.nif_error(:nif_not_loaded)
end

Examples

This is a complete example of a NIF written in Rust.