<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: LetsGetToWorkBro</title>
    <description>The latest articles on DEV Community by LetsGetToWorkBro (@letsgettoworkbro).</description>
    <link>https://dev.to/letsgettoworkbro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4027955%2Fac083444-a693-452e-9b75-ae74fbf550b1.png</url>
      <title>DEV Community: LetsGetToWorkBro</title>
      <link>https://dev.to/letsgettoworkbro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/letsgettoworkbro"/>
    <language>en</language>
    <item>
      <title>Build your first AR glasses lens in 10 minutes (no hardware needed)</title>
      <dc:creator>LetsGetToWorkBro</dc:creator>
      <pubDate>Tue, 14 Jul 2026 02:12:29 +0000</pubDate>
      <link>https://dev.to/letsgettoworkbro/build-your-first-ar-glasses-lens-in-10-minutes-no-hardware-needed-2af2</link>
      <guid>https://dev.to/letsgettoworkbro/build-your-first-ar-glasses-lens-in-10-minutes-no-hardware-needed-2af2</guid>
      <description>&lt;p&gt;DreamLayer is an open source memory layer for AR glasses (Apache-2.0). It has a plugin system, called lenses, and the smallest complete one is about 25 lines of Python. Here's the whole thing, start to finish, no hardware required.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a plugin actually is
&lt;/h2&gt;

&lt;p&gt;A plugin is a &lt;code&gt;register(ctx)&lt;/code&gt; function plus a factory that wraps it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dreamlayer.plugins&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;make_plugin&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;draw_hello_card&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;card&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;            &lt;span class="c1"&gt;# fn(draw, card): paint the 256px glass
&lt;/span&gt;    &lt;span class="n"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;118&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;card&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello, world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="n"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;44&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;199&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;154&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;anchor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_card_renderer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;HelloCard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;draw_hello_card&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;make&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;                                  &lt;span class="c1"&gt;# the manifest's entry point
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;make_plugin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello-lens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;requires&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cards&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. &lt;code&gt;ctx&lt;/code&gt; is a narrow context object, a plugin can extend the registries and read a couple bits of state, and nothing else. &lt;code&gt;requires&lt;/code&gt; names the capabilities you actually need (&lt;code&gt;cards&lt;/code&gt;, &lt;code&gt;vision&lt;/code&gt;, &lt;code&gt;network&lt;/code&gt;, &lt;code&gt;mesh&lt;/code&gt;, &lt;code&gt;shop&lt;/code&gt;, and a handful more), and the host grants or skips your plugin based on that, cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it locally
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"host-python[dev]"&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;host-python &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; python &lt;span class="nt"&gt;-m&lt;/span&gt; pytest &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; hello_lens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use the CLI directly, from the plugin's folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dreamlayer plugins validate &lt;span class="nb"&gt;.&lt;/span&gt;    &lt;span class="c"&gt;# runs the full store gate&lt;/span&gt;
dreamlayer plugins preview &lt;span class="nb"&gt;.&lt;/span&gt;     &lt;span class="c"&gt;# renders your card through the real 256px glass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No glasses needed for any of this. There's also a browser simulator that runs the real renderer and orchestrator if you want to see it live: dreamlayer.app/simulator.html.&lt;/p&gt;

&lt;h2&gt;
  
  
  Package it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dreamlayer plugins pack &lt;span class="nb"&gt;.&lt;/span&gt;        &lt;span class="c"&gt;# -&amp;gt; a store-ready package JSON&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This computes a checksum binding your manifest and module together, no manual hashing. Every install replays a validation gate: manifest shape, checksum integrity, a static scan proving your code never touches a capability it didn't declare, and a smoke load.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ship it
&lt;/h2&gt;

&lt;p&gt;Open a PR adding your plugin to the registry, or just share the package JSON, anyone can sideload it through the same gate from the control panel.&lt;/p&gt;

&lt;p&gt;Scaffold a fresh one anytime with &lt;code&gt;dreamlayer plugins new my-lens&lt;/code&gt;. Full quickstart in docs/SDK.md, full example folder at examples/hello-lens.&lt;/p&gt;

&lt;p&gt;Copy it, rename everything, build the lens you wish existed.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
