Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ All render functions accept these options:

Full documentation is available at [hexdocs.pm/typst](https://hexdocs.pm/typst).

## Building from Source

When you add this package to your `mix.exs` dependencies, it will by default
attempt to use precompiled Rustler assets. To override this behaviour, add
`{:rustler, ">= 0.0.0"}` to your `mix.exs`, and set the environment variable
`TYPST_BUILD=true`. Alternatively, you can put the following in your
`config.exs`:

```elixir
config :rustler_precompiled, :force_build, typst: true
```

Building from source requires a rust toolchain of at least version `1.92.0`.

## Cutting a new release

* Make the code changes
Expand Down
1 change: 1 addition & 0 deletions lib/typst_nif.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ defmodule Typst.NIF do
base_url: "#{github_url}/releases/download/v#{version}",
nif_versions: ["2.15", "2.17"],
mode: mode,
force_build: System.get_env("TYPST_BUILD") in ["1", "true"],
target: System.get_env("RUSTLER_TARGET")

def compile_pdf(_content, _root_dir, _font_paths, _assets, _cache_fonts),
Expand Down