gleam add amberAmber only supports the JavaScript target using the Deno runtime.
The following configuration should be used in your gleam.toml.
target = "javascript"
[javascript]
runtime = "deno"import amber
import gossamer/text_encoder
pub fn main() {
let assert Ok(_) =
amber.write_file_sync(
to: "amber.txt",
contents: text_encoder.encode("deno bindings for gleam"),
)
}Further documentation can be found at https://hexdocs.pm/amber.
Tip: These can also be installed via
mise or
asdf, which read from
.tool-versions.
justjust watch build test