Skip to content

NIF wrapper of html5ever using Rustler

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rusterlium/html5ever_elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

22c3fac · Feb 12, 2025
Jan 25, 2025
Jun 16, 2023
Feb 5, 2025
Jan 13, 2017
May 15, 2024
Oct 2, 2021
Dec 6, 2021
May 15, 2024
Feb 8, 2017
Feb 8, 2017
Mar 25, 2024
Mar 25, 2024
Jan 25, 2025
Feb 12, 2025

Repository files navigation

Html5ever binding for Elixir

CI

NIF binding of html5ever using Rustler.

It is currently functional with basic features.

Installation

The package can be installed by adding html5ever to your list of dependencies in mix.exs:

def deps do
  [{:html5ever, "~> 0.16.0"}]
end

Or with Mix.install/1:

Mix.install([:html5ever])

Forcing compilation

By default you don't need Rust installed because the lib will try to download a precompiled NIF file. In case you want to force compilation set the HTML5EVER_BUILD environment variable to true or 1. Alternatively you can also set the application env :build_from_source to true in order to force the build:

config :html5ever, Html5ever, build_from_source: true

You also need to add Rustler to your dependencies when you want to force the compilation:

def deps do
  [
    {:html5ever, "~> 0.16.0"},
    {:rustler, ">= 0.0.0", optional: true}
  ]
end

License

Licensed under either of

at your option.