Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rusterlium/html5ever_elixir
NIF wrapper of html5ever using Rustler
https://github.com/rusterlium/html5ever_elixir
binding elixir erlang html-parser html5ever nif rustler
Last synced: 3 days ago
JSON representation
NIF wrapper of html5ever using Rustler
- Host: GitHub
- URL: https://github.com/rusterlium/html5ever_elixir
- Owner: rusterlium
- License: apache-2.0
- Created: 2017-01-13T18:55:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-10T15:44:52.000Z (12 days ago)
- Last Synced: 2025-01-12T05:01:56.718Z (10 days ago)
- Topics: binding, elixir, erlang, html-parser, html5ever, nif, rustler
- Language: HTML
- Homepage: https://hexdocs.pm/html5ever
- Size: 467 KB
- Stars: 83
- Watchers: 8
- Forks: 71
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Html5ever binding for Elixir
[![CI](https://github.com/rusterlium/html5ever_elixir/actions/workflows/ci.yml/badge.svg)](https://github.com/rusterlium/html5ever_elixir/actions/workflows/ci.yml)
NIF binding of [html5ever](https://github.com/servo/html5ever) using [Rustler](https://github.com/rusterlium/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`:
```elixir
def deps do
[{:html5ever, "~> 0.16.0"}]
end
```Or with [`Mix.install/1`](https://hexdocs.pm/mix/Mix.html#install/2):
```elixir
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:```elixir
config :html5ever, Html5ever, build_from_source: true
```You also need to add Rustler to your dependencies when you want to force
the compilation:```elixir
def deps do
[
{:html5ever, "~> 0.16.0"},
{:rustler, ">= 0.0.0", optional: true}
]
end
```## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.