Crates.io | duster |
lib.rs | duster |
version | 0.1.1 |
source | src |
created_at | 2020-12-30 00:02:07.884066 |
updated_at | 2021-02-06 21:29:17.57767 |
description | A rust implementation of the dustjs template engine. |
homepage | |
repository | https://code.fizz.buzz/talexander/duster |
max_upload_size | |
id | 329045 |
size | 344,559 |
An implementation of the LinkedIn fork of DustJS written in rust.
WARNING: Early-stage project
While I've added a lot of tests proving a byte-for-byte compatibility with the official LinkedIn DustJS implementation, this project has not (afaik) been used in any sort of large production environment. If you find any incompatibilities between this implementation and the LinkedIn DustJS implementation, please let me know (or even better: commit a test under js/test_cases
!).
LinkedIn DustJS supports embedding javascript functions inside the render context itself. I will never be adding a javascript engine to this project, so those functions will not work in duster. I do have two plans to provide similar functionality:
The parser combinator library that I am using (nom) does not support unicode characters. In the future I will fix this, either by writing new parsers for the nom framework or by writing my own parser combinator framework. I'd prefer the former option since using a widely used parser combinator framework allows for greater interoperability across other projects (for example, if a nom-based html parser wanted to add support for parsing dust templates inside an text/x-dust-template
tag, they could simply embed my parser inside theirs).
While this repository uses the 0BSD license which does not require the inclusion of a copyright notice/text in any distribution, it depends on some bsd-style licensed libraries including (but potentially not limited to):
I am not a lawyer, and I am not your lawyer. This is not legal advice, but I believe attribution for these projects and their dependencies would be required under the terms of their licenses.