Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust web agents documentation #198

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 91 additions & 13 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ exclude:

# Every top level section is actually a collection. Their files are in a _folder in src/
collections:
devguide:
java_devguide:
label: Java Developer Guide
kind: docs
output: true
name: "Developer Guide"
description: An ordered guide through SwimOS.
permalink: /developer-guide/:name/
name: "Java Developer Guide"
description: An ordered guide through SwimOS Java.
permalink: /java/developer-guide/:name/
order:
- index.md
# 1. Introduction
Expand All @@ -99,12 +100,35 @@ collections:
# 3.1 Agent URIs
# 3.2 Agent Properties
# 3.3 Traits
backend:
rust_devguide:
label: Rust Developer Guide
kind: docs
output: true
name: "Backend"
description: Documentation about SwimOS fundamentals and CLI usage.
permalink: /backend/:name/
name: "Rust Developer Guide"
description: An ordered guide through SwimOS Rust.
permalink: /rust/developer-guide/:name/
order:
- index.md
# 1. Introduction
- 1-introduction.md
# 2. Getting Started
- 2-getting-started.md
- 2.1-swim-create.md
- 2.2-project-setup.md
- 2.3-hello-world.md
- 2.4-hello-agent.md
- 2.5-hello-lane.md
# 3. Agents
# 3.1 Agent Details (parallel, atomic, no constructor, logging)
# 3.1 Agent URIs
# 3.2 Agent Properties
# 3.3 Traits
java_backend:
kind: docs
output: true
name: "Java Backend"
description: Documentation about SwimOS Java fundamentals and CLI usage.
permalink: /java/backend/:name/
order:
- index.md
# Getting Started
Expand Down Expand Up @@ -151,6 +175,46 @@ collections:
- recon.md
- warp.md
weight: 1
rust_backend:
kind: docs
output: true
name: "Rust Backend"
description: Documentation about SwimOS Rust fundamentals.
permalink: /rust/backend/:name/
order:
- index.md
# Getting Started
- fundamentals.md
- lane-organization.md
- agent-design.md
- swim-libraries.md
# Reference
- server.md
- web-agents.md
- lanes.md
- command-lanes.md
- value-lanes.md
- map-lanes.md
- join-value-lanes.md
- join-map-lanes.md
- demand-value-lanes.md
- demand-map-lanes.md
- planes.md
- links.md
- downlinks.md
- server-downlinks.md
- forms.md
- timers.md
- http-lanes.md
- persistence.md
# Swim Apps
- time-series.md
- summary-statistics.md
- aggregations.md
# Utilities
- cli.md
- introspection.md
weight: 1
frontend:
kind: docs
output: true
Expand Down Expand Up @@ -181,10 +245,22 @@ collections:
# Integrations
# - react.md
weight: 1
tutorials:
java_tutorials:
kind: docs
output: true
name: "Java Tutorials"
permalink: /java/tutorials/:name/
order:
- index.md
- demos.md
- transit.md
- monitor.md
weight: 2
rust_tutorials:
kind: docs
output: true
name: "Tutorials"
name: "Rust Tutorials"
permalink: /rust/tutorials/:name/
order:
- index.md
- demos.md
Expand Down Expand Up @@ -221,7 +297,7 @@ defaults:
toc:
list_id: toc # id of the <ul> for the toc
list_class: mt-1 px-2 # We use TailwindCSS classes but you can also create your own
sublist_class: '' # We use TailwindCSS classes but you can also create your own
sublist_class: "" # We use TailwindCSS classes but you can also create your own
item_class: hover:text-swim-blue block rounded-md py-2 pr-2 pl-9 text-sm leading-6 text-swim-body-text # You guessed it, more TailwindCSS classes.
item_prefix: toc- # Adds a toc-* class to each list item for styling. Ex. toc-h2 for list items that refer to an h2 in the doc body.

Expand All @@ -235,8 +311,10 @@ announcement:

feed:
collections:
- tutorials
- backend
- java_tutorials
- java_backend
- rust_tutorials
- rust_backend
- meta

paginate: 9
Expand Down
53 changes: 31 additions & 22 deletions _data/header-nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,45 @@
- section: Documentation
id: documentation
menu:
- group: Backend
- group: Java Backend
items:
- title: Backend Documentation
blurb:
blurb:
icon: "fa-solid fa-server"
url: /backend/
url: /java/backend/
- title: Developer Guide
blurb: Learn SwimOS from the start
blurb: Learn SwimOS Java from the start
icon: "fa-brands fa-java"
url: /java/developer-guide/
- title: Tutorials
blurb:
icon: "fa-solid fa-graduation-cap"
url: /java/tutorials/
- group: Rust Backend
items:
- title: Backend Documentation
blurb:
icon: "fa-solid fa-server"
url: /rust/backend/
- title: Rust Developer Guide
blurb: Learn SwimOS Rust from the start
icon: "fa-brands fa-java"
url: /developer-guide/
url: /rust/developer-guide/
- title: Tutorials
blurb:
icon: "fa-solid fa-graduation-cap"
url: /rust/tutorials/
- group: Frontend
items:
- title: Frontend Documentation
blurb:
blurb:
icon: "fa-solid fa-code"
url: /frontend/
- group: Tutorials & Blog
items:
- title: Tutorials
blurb:
icon: "fa-solid fa-graduation-cap"
url: /tutorials/
- title: Blog
blurb:
icon: "fa-solid fa-rss"
url: /blog/

# - group: Frontend
# items:
# - title: Swim UI Documentation
# blurb:
# blurb:
# icon: "fa-solid fa-display"
# url: /frontend/
more:
Expand All @@ -91,10 +100,10 @@
menu:
- group: Code
items:
- title: GitHub
blurb: Check out Swims latest projects and commits on GitHub.
icon: "fa-brands fa-github"
url: https://github.com/swimos/swim
- title: GitHub
blurb: Check out Swim's latest projects and commits on GitHub.
icon: "fa-brands fa-github"
url: https://github.com/swimos/swim
# Java Doc & JS info is updated in header.html
- group: Contribute
items:
Expand All @@ -103,7 +112,7 @@
icon: "fa-solid fa-bug"
url: https://github.com/swimos/swim/issues/new
- title: Code of Conduct
blurb:
blurb:
icon: "fa-solid fa-people-roof"
url: https://github.com/swimos/swimos-docs/blob/main/CODE_OF_CONDUCT.md
- title: Contributor's Guide
Expand Down
7 changes: 7 additions & 0 deletions _data/rust-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SwimOS crates
swimos-version: 0.1.0
swimos-client-version: 0.1.0
swimos-form-version: 0.1.0

# Support crates
tokio-version: 1.3
18 changes: 11 additions & 7 deletions _includes/docs-categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<div class="mx-auto mt-32 max-w-7xl sm:px-6 lg:px-8">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<div class="max-w-2xl mb-8">
<h3 class="flex items-center text-2xl sm:text-3xl font-semibold leading-8 text-kaimurasaki-800">SwimOS Reference</h3>
<h3 class="flex items-center text-2xl sm:text-3xl font-semibold leading-8 text-kaimurasaki-800">SwimOS
Reference</h3>
<!-- <div class="mt-2 text-lg leading-8 text-kaimurasaki-700">?</div> -->
</div>
</div>
<ul role="list" class="grid grid-cols-1 gap-x-10 gap-y-12 lg:grid-cols-3 xl:gap-x-12">
<li class="flex flex-col justify-between overflow-hidden rounded-xl border border-swim-purple bg-swim-dark-blue text-white">
<li
class="flex flex-col justify-between overflow-hidden rounded-xl border border-swim-purple bg-swim-dark-blue text-white">
<div class="flex items-center gap-x-4 border-b border-gray-900/5 p-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="#BA62FF" viewBox="0 0 448 512" stroke-width="2"
stroke="currentColor"
Expand All @@ -22,14 +24,15 @@ <h3 class="flex items-center text-2xl sm:text-3xl font-semibold leading-8 text-k
Learn how to build stateful backend services for streaming data applications.
</p>
<div class="mt-10 mb-10 pt-12 text-center">
<a href="{% link _backend/index.md %}"
<a href="{% link _java_backend/index.md %}"
class="no-underline rounded-full px-4 py-2.5 text-sm font-semibold text-white shadow-sm ring-1 ring-inset ring-white hover:bg-white hover:text-swim-dark-blue">Get
started</a>
</div>
</div>
</li>

<li class="flex flex-col justify-between overflow-hidden rounded-xl border border-swim-teal bg-swim-dark-blue text-white">
<li
class="flex flex-col justify-between overflow-hidden rounded-xl border border-swim-teal bg-swim-dark-blue text-white">
<div class="flex items-center gap-x-4 border-b border-gray-900/5 p-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="#66FFDD" viewBox="0 0 512 512" stroke-width="2"
stroke="currentColor"
Expand All @@ -45,14 +48,15 @@ <h3 class="flex items-center text-2xl sm:text-3xl font-semibold leading-8 text-k
Learn how to build real-time user interfaces for streaming data applications.
</p>
<div class="mt-10 mb-10 pt-12 text-center">
<a href="{% link _backend/index.md %}"
<a href="{% link _java_backend/index.md %}"
class="no-underline rounded-full px-4 py-2.5 text-sm font-semibold text-white shadow-sm ring-1 ring-inset ring-white hover:bg-white hover:text-swim-dark-blue">Get
started</a>
</div>
</div>
</li>

<li class=" flex flex-col justify-between overflow-hidden rounded-xl border border-swim-blue bg-swim-dark-blue text-white">
<li
class=" flex flex-col justify-between overflow-hidden rounded-xl border border-swim-blue bg-swim-dark-blue text-white">
<div class="flex items-center gap-x-4 border-b border-gray-900/5 p-6">

<svg xmlns="http://www.w3.org/2000/svg" fill="#32C5FF" viewBox="0 0 640 512" stroke-width="2"
Expand Down
88 changes: 49 additions & 39 deletions _layouts/documentation.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,57 @@
<!doctype html>
<html class="w-screen min-h-full scroll-pt-[calc(48px+20px)] lg:scroll-pt-[calc(60px+20px)] bg-white scroll-smooth" lang="{{ page.lang | default: site.lang | default: 'en' }}">
{%- include head.html -%}
{%- include docs-feedback-widget.html -%}
<body class="overflow-x-hidden">
{% include google-tag-noscript.html %}
<div class="flex flex-wrap items-start bg-white">
<!-- Header -->
{%- include banner.html -%}
{%- include header.html sticky=false -%}
{%- include docs-header.html sticky=true -%}
<html class="w-screen min-h-full scroll-pt-[calc(48px+20px)] lg:scroll-pt-[calc(60px+20px)] bg-white scroll-smooth"
lang="{{ page.lang | default: site.lang | default: 'en' }}">
{%- include head.html -%}
{%- include docs-feedback-widget.html -%}

<!-- Left margin -->
<div class="{% if page.toc %}grow lg:grow-0 xl:grow basis-[1px] lg:basis-4{% else %}grow-0 xl:grow lg:basis-4{% endif %}"></div>
<!-- Sidebar -->
<aside class="hidden lg:block lg:top-[60px] lg:w-[224px] lg:py-10 overflow-x-none overflow-y-auto">
{%- include docs-sidebar.html -%}
</aside>
<body class="overflow-x-hidden">
{% include google-tag-noscript.html %}
<div class="flex flex-wrap items-start bg-white">
<!-- Header -->
{%- include banner.html -%}
{%- include header.html sticky=false -%}
{%- include docs-header.html sticky=true -%}

<!-- Main content -->
<main class="w-screen{% if page.toc %} max-w-[768px] lg:w-[784px] lg:max-w-[784px] xl:w-[800px] xl:max-w-[800px] grow lg:grow-0{% else %} max-w-[1024px] xl:w-[1024px] lg:basis-0 xl:basis-auto grow xl:grow-0{% endif %} px-6{% if page.toc %} lg:px-8 xl:px-10{% else %} lg:pl-8 lg:pr-4 xl:pl-10{% endif %} py-10 lg:mb-14 prose prose-code:before:hidden prose-code:after:hidden">
<h1 class="text-swim-dark-blue">{{ page.title }}</h1>
{{ content | inject_anchors }}
<hr class="mb-0 border-t-vermilion"/>
{%- include prev-next.html -%}
</main>
<!-- Left margin -->
<div
class="{% if page.toc %}grow lg:grow-0 xl:grow basis-[1px] lg:basis-4{% else %}grow-0 xl:grow lg:basis-4{% endif %}">
</div>
<!-- Sidebar -->
<aside class="hidden lg:block lg:top-[60px] lg:w-[224px] lg:py-10 overflow-x-none overflow-y-auto">
{%- include docs-sidebar.html -%}
</aside>

<!-- Main content -->
<main
class="w-screen{% if page.toc %} max-w-[768px] lg:w-[784px] lg:max-w-[784px] xl:w-[800px] xl:max-w-[800px] grow lg:grow-0{% else %} max-w-[1024px] xl:w-[1024px] lg:basis-0 xl:basis-auto grow xl:grow-0{% endif %} px-6{% if page.toc %} lg:px-8 xl:px-10{% else %} lg:pl-8 lg:pr-4 xl:pl-10{% endif %} py-10 lg:mb-14 prose prose-code:before:hidden prose-code:after:hidden">
<h1 class="text-swim-dark-blue">{{ page.title }}</h1>
{{ content | inject_anchors }}
<hr class="mb-0 border-t-vermilion" />
{%- include prev-next.html -%}
</main>

{% if page.toc %}
<!-- Table of contents -->
<aside class="hidden xl:block xl:sticky xl:top-[60px] xl:w-[224px] xl:max-h-[calc(100vh-60px)] xl:py-10 overflow-x-none overflow-y-auto">
<div x-data @scroll.window="updateActiveSection">
<h2 class="flex items-center text-xs font-medium leading-6 tracking-wider uppercase text-kaimurasaki-800">On this page</h2>
{% toc %}
</div>
</aside>
<!-- Table of contents -->
<aside
class="hidden xl:block xl:sticky xl:top-[60px] xl:w-[224px] xl:max-h-[calc(100vh-60px)] xl:py-10 overflow-x-none overflow-y-auto">
<div x-data @scroll.window="updateActiveSection">
<h2 class="flex items-center text-xs font-medium leading-6 tracking-wider uppercase text-kaimurasaki-800">On
this page</h2>
{% toc %}
</div>
</aside>
{% endif %}
<!-- Right margin -->
<div class="{% if page.toc %}grow lg:grow-0 xl:grow basis-[1px] xl:basis-4{% else %}grow-0 xl:grow lg:basis-4{% endif %}"></div>

<!-- Footer -->
{%- include footer.html -%}
<!-- Right margin -->
<div
class="{% if page.toc %}grow lg:grow-0 xl:grow basis-[1px] xl:basis-4{% else %}grow-0 xl:grow lg:basis-4{% endif %}">
</div>
{%- include footer-scripts.html -%}

</body>
<script src="/assets/js/copy-code.js"></script>

<!-- Footer -->
{%- include footer.html -%}
</div>
{%- include footer-scripts.html -%}

</body>
<script src="/assets/js/copy-code.js"></script>

</html>
Loading