Release 0.1.5 - 2026-08-15

This release introduces support for Ember components, which are translated at build time into Leptos components. A LinkTo built-in component is also implemented. When generating an application adapter, it also provides an option to extend the REST adapter via delegation.

Read the full change log here.

Components!

Let's generate a new component:

$ auric generate component customer-card
created src/components/customer_card.hbs
==> make
   Compiling my-app v0.1.0 (/Users/davidr/workspaces/drr)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.13s

The default contents are pretty basic:

$ cat src/components/customer_card.hbs
{{yield}}

Let's customize it:

<div class="card text-center">
    <div class="card-body">
        {{yield}}
    </div>
</div>

And now let's use it from a template:

{{!-- src/templates/customers.hbs --}}
<CustomerCard>
    Acme Widgets
</CustomerCard>

<CustomerCard>
    Standard Paper Supplies, Inc.
</CustomerCard>

Now let's build our application, and examine the generated customer view:

$ make
$ cat src/generated/views/customers.rs
use crate::generated::components::{
    customer_card::CustomerCardComponent,
};

#[component]
pub fn CustomersView() -> impl IntoView {
    view! {
        <CustomerCardComponent>
            Acme Widgets
        </CustomerCardComponent>
        
        <CustomerCardComponent>
            Standard Paper Supplies, Inc.
        </CustomerCardComponent>
    }
}

LinkTo

A built-in LinkTo component is provided, with initial support for a static literal @route parameter. Use it like this from a template:

<LinkTo @route="customers">Customers</LinkTo>

And it will be translated by the build process into a Leptos view like this:

pub fn MyView() -> impl IntoView {
    view! {
        ...
        <LinkTo path="customers".to_string()>Customers</LinkTo>
    }
}

Application Adapter → REST Adapter

Previously, performing auric generate adapter application generated an empty struct full of todo() markers.

A new --target rest flag is now supported, which will leave you with a fully-functioning application adapter. Here's how it looks:

$ auric generate adapter application --target rest
created src/adapters/application.rs
updated src/adapters/mod.rs
==> make
   Compiling auric-build v0.1.5 (/Users/davidr/workspaces/auric-spa/auric/crates/auric-build)
   Compiling my-app v0.1.0 (/Users/davidr/workspaces/drr)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.32s

$ cat src/adapters/application.rs
#[derive(Default)]
pub struct ApplicationAdapter {
    target: RestAdapter,
}

#[async_trait(?Send)]
impl Adapter for ApplicationAdapter {
    fn init(&mut self, config: &Config) -> Result<()> {
        self.target.init(config)
    }

    async fn create_record(&self, resource: Resource) -> Result<Resource> {
        self.target.create_record(resource).await
    }

    async fn delete_record(&self, resource: &Resource) -> Result<()> {
        self.target.delete_record(resource).await
    }

    async fn find_record(&self, resource_type: &str, id: &str) -> Result<Resource> {
        self.target.find_record(resource_type, id).await
    }

    async fn query(&self, resource_type: &str, query: serde_json::Value) -> Result<Vec<Resource>> {
        self.target.query(resource_type, query).await
    }

    async fn query_record(
        &self,
        resource_type: &str,
        query: serde_json::Value,
        options: QueryRecordOptions,
    ) -> Result<Option<Resource>> {
        self.target
            .query_record(resource_type, query, options)
            .await
    }

    async fn update_record(&self, resource: Resource) -> Result<Resource> {
        self.target.update_record(resource).await
    }
}

©2026 Megalithic LLC | Website | Guide | GitLab | Contact