@barefootjs/rust 0.1.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/index.js +1 -1
- package/dist/build.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/runtime/Cargo.toml +5 -0
- package/runtime/README.md +34 -0
package/dist/adapter/index.js
CHANGED
|
@@ -18568,7 +18568,7 @@ https://github.com/browserify/crypto-browserify`);
|
|
|
18568
18568
|
|
|
18569
18569
|
// ../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js
|
|
18570
18570
|
var require_typescript = __commonJS((exports, module) => {
|
|
18571
|
-
var __dirname = "/
|
|
18571
|
+
var __dirname = "/home/runner/work/barefootjs/barefootjs/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib", __filename = "/home/runner/work/barefootjs/barefootjs/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js";
|
|
18572
18572
|
/*! *****************************************************************************
|
|
18573
18573
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18574
18574
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
package/dist/build.js
CHANGED
|
@@ -18568,7 +18568,7 @@ https://github.com/browserify/crypto-browserify`);
|
|
|
18568
18568
|
|
|
18569
18569
|
// ../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js
|
|
18570
18570
|
var require_typescript = __commonJS((exports, module) => {
|
|
18571
|
-
var __dirname = "/
|
|
18571
|
+
var __dirname = "/home/runner/work/barefootjs/barefootjs/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib", __filename = "/home/runner/work/barefootjs/barefootjs/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js";
|
|
18572
18572
|
/*! *****************************************************************************
|
|
18573
18573
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18574
18574
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
package/dist/index.js
CHANGED
|
@@ -18568,7 +18568,7 @@ https://github.com/browserify/crypto-browserify`);
|
|
|
18568
18568
|
|
|
18569
18569
|
// ../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js
|
|
18570
18570
|
var require_typescript = __commonJS((exports, module) => {
|
|
18571
|
-
var __dirname = "/
|
|
18571
|
+
var __dirname = "/home/runner/work/barefootjs/barefootjs/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib", __filename = "/home/runner/work/barefootjs/barefootjs/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js";
|
|
18572
18572
|
/*! *****************************************************************************
|
|
18573
18573
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18574
18574
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/rust",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "minijinja (Rust) adapter for BarefootJS — compiles IR to .j2 templates and ships a Rust rendering runtime (packages/adapter-rust/runtime/); runs under any Rust web framework (axum, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"directory": "packages/adapter-rust"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@barefootjs/shared": "0.
|
|
57
|
+
"@barefootjs/shared": "0.18.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@barefootjs/jsx": ">=0.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@barefootjs/adapter-tests": "0.1.0",
|
|
64
|
-
"@barefootjs/jsx": "0.
|
|
64
|
+
"@barefootjs/jsx": "0.18.1",
|
|
65
65
|
"typescript": "^5.0.0"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/runtime/Cargo.toml
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "barefootjs"
|
|
3
|
+
# Placeholder — the crates-release job stamps the @barefootjs/rust version
|
|
4
|
+
# resolved by changesets over this value before `cargo publish`.
|
|
3
5
|
version = "0.1.0"
|
|
4
6
|
edition = "2021"
|
|
5
7
|
description = "Rust runtime for BarefootJS marked templates (minijinja adapter)."
|
|
6
8
|
license = "MIT"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
homepage = "https://barefootjs.dev"
|
|
11
|
+
repository = "https://github.com/piconic-ai/barefootjs"
|
|
7
12
|
|
|
8
13
|
[lib]
|
|
9
14
|
name = "barefootjs"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# barefootjs
|
|
2
|
+
|
|
3
|
+
Rust runtime for [BarefootJS](https://barefootjs.dev/) marked templates, targeting [minijinja](https://crates.io/crates/minijinja).
|
|
4
|
+
|
|
5
|
+
[BarefootJS](https://github.com/piconic-ai/barefootjs) is a fine-grained reactive TSX compiler: you write components in TSX, and the compiler emits templates for your backend's template engine plus the client-side JS that hydrates them. This crate is the server half for Rust — it renders the templates produced by the `@barefootjs/rust` adapter.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
cargo add barefootjs
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Build a minijinja environment over the compiled template directory with `backend_minijinja::build_environment`, create a root `BfInstance` for the render (`BfInstance::root`), then render a named component template with `backend_minijinja::render_named`. `load_manifest` / `register_components_from_manifest` wire up the component manifest emitted by the compiler, and a `bf-render` binary is included for rendering from the command line.
|
|
16
|
+
|
|
17
|
+
Key modules:
|
|
18
|
+
|
|
19
|
+
| Module | Role |
|
|
20
|
+
|--------|------|
|
|
21
|
+
| `runtime` | the engine-agnostic `bf` object (`BfInstance`, `RenderSession`) |
|
|
22
|
+
| `backend_minijinja` | the minijinja engine backend |
|
|
23
|
+
| `evaluator` | ParsedExpr evaluator for the `*_eval` helpers |
|
|
24
|
+
| `manifest` | component manifest loading and registration |
|
|
25
|
+
| `search_params` | `searchParams()` SSR reader |
|
|
26
|
+
|
|
27
|
+
## Documentation
|
|
28
|
+
|
|
29
|
+
- [barefootjs.dev](https://barefootjs.dev/) — core documentation
|
|
30
|
+
- [GitHub: piconic-ai/barefootjs](https://github.com/piconic-ai/barefootjs) — monorepo (this crate lives at `packages/adapter-rust/runtime`)
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|