Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
4c50b984
Commit
4c50b984
authored
4 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[docs] dev: add repository architecture explanation
parent
92fbca33
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/dev/architecture-french.md
+48
-0
48 additions, 0 deletions
doc/dev/architecture-french.md
doc/dev/architecture.md
+48
-0
48 additions, 0 deletions
doc/dev/architecture.md
with
96 additions
and
0 deletions
doc/dev/architecture-french.md
0 → 100644
+
48
−
0
View file @
4c50b984
# Duniter architecture
Title: Duniter architecture
Order: 1
Date: 2020-05-04
Slug: architecture_fench
Authors: elois
## Deux langages : Rust & Typescript
Historiquement, Duniter était en pur javascript et propulsé par [NodeJs] (avec quelques addons en C/C++).
Entre temps, Duniter a été entièrement réécris en [Typescript].
Le [Typescript] est un langage de typage qui est ensuite "transpilé" en javascript.
Au runtime, c'est toujours du code javascript qui est interprété par [NodeJs], le code [Typescript] "disparait" à la compilation.
Duniter est actuellement en cours de migration du [Typescript] vers le [Rust].
Cette migration se fait progressivement via un binding [NodeJs]
<->
[Rust] assuré par [Neon].
le fait de migrer du code en [Rust] est communément nommée "oxydation", on parle donc de "l'oxydation de Duniter".
L'objectif à terme est d'oxyder entièrement Duniter, mais c'est un long processus qui va s'étaler sur plusieurs années.
## Deux variantes: server & desktop
La variante "server" est en ligne de commande et la variante "desktop" possède une interface graphique dans une fenêtre.
La variante "server" porte mal son nom car les deux variantes embarquent un serveur Duniter.
## Architecture du dépôt
Dossiers :
-
`app/`
: Code source Typescript.
-
`bin/`
: Point d'entrée de l'application. Actuellement c'est un script js, si l'oxydation deviens totale ce sera remplacé par une crate binaire.
-
`doc/`
: Documentation (en markdown).
-
`gui/`
: Page d'acceuil et icone pour la variante desktop.
-
`images/`
: Logo de Duniter dans differentes tailles et différents formats.
-
`neon/`
: Code pour le binding NodeJs
<->
Rust
-
`release/`
: Scripts de build des livrables et resources pour les livrables (systemd, completion bash, etc)
-
`rust-libs/`
: Code source Rust
-
`test/`
: Tests automatisés du code javascript
Si l'oxydation de duniter se fait jusqu'au bout, les dossiers
`app/`
,
`neon/`
et
`test/`
disparaitrons.
Les tests d'intégration de chaque crate rust se trouvent dans le sous-dossier tests du dossier de la crate.
[
Neon
]:
https://neon-bindings.com/
[
NodeJs
]:
https://nodejs.org/en/
[
Rust
]:
https://www.rust-lang.org/
[
Typescript
]:
https://www.typescriptlang.org/
This diff is collapsed.
Click to expand it.
doc/dev/architecture.md
0 → 100644
+
48
−
0
View file @
4c50b984
# Duniter architecture
Title: Duniter architecture
Order: 1
Date: 2020-05-04
Slug: architecture
Authors: elois
## Two languages : Rust & Typescript
Historically, Duniter was pure javascript and powered by [NodeJs] (with some C/C++ addons).
In the meantime, Duniter has been entirely rewritten in [Typescript].
Typescript] is a typing language which is then "transpiled" into javascript.
At runtime, it is always javascript code that is interpreted by [NodeJs], the [Typescript] code "disappears" at compile time.
Duniter is currently migrating from [Typescript] to [Rust].
This migration is being done gradually via a [NodeJs]
<->
[Rust] binding provided by [Neon].
The fact of migrating from code to [Rust] is commonly called "oxidation", so we speak of "Duniter's oxidation".
The long-term goal is to oxidize Duniter entirely, but it is a long process that will take several years.
## Two variants: server & desktop
The "server" variant is command line based and the "desktop" variant has a graphical interface in a window.
The "server" variant has a bad name because both variants include a Duniter server.
## Repository architecture
Folders:
-
`app/`
: Typescript source code.
-
`bin/`
: Entry point of the application. Currently it's a js script, in the future it will be replaced by a binary crate.
-
`doc/`
: Documentation (in markdown).
-
`gui/`
: Home page and icon for the desktop variant.
-
`images/`
: Duniter logo in different sizes and formats
-
`neon/`
: Code for binding NodeJs
<->
Rust
-
`release/`
: Build scripts of the deliverables and resources for it
-
`rust-libs/`
: Rust source code
-
`test/`
: Automated testing of javascript code
If duniter oxidation is completed, the
`app/`
,
`neon/`
and
`test/`
folders will disappear.
The integration tests for each rust crate can be found in the tests subfolder of the crate folder.
[
Neon
]:
https://neon-bindings.com/
[
NodeJs
]:
https://nodejs.org/en/
[
Rust
]:
https://www.rust-lang.org/
[
Typescript
]:
https://www.typescriptlang.org/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment