turn into a cell package

This commit is contained in:
2025-12-08 17:39:17 -06:00
parent aae267a6e9
commit 38d6b4d4e8
52 changed files with 44 additions and 1 deletions

View File

View File

@@ -25,4 +25,40 @@ the "cell upgrade" command is a command to upgrade the cell version in a shop.
cell update - update all packages in the shop, and builds their code for local use
cell install <package> - install a package
cell remove <package> - remove a package
cell build - build the package in the current directory into a cell executable
cell build - build the package in the current directory into a cell executable
cell version - the version of cell being used
## building
cell builds itself from source on your compuer!
all source for every single part of a cell program are located in the cell shop.
the cell shop looks like this:
.cell
packages
gitea.pockle.world/john/cell <--- this is the root cell
gitea.pockle.world/john/prosperon
cell.toml <--- the manifest of the package
mod1.cm
mod2.cm
actor1.ce
addon.c <--- a C file for compiling into the cell executable
etc
gitea.pockle.world/john/accio
/Users/john/work/prosperon
...
link.toml - temporary links for this cell shop
lock.toml - manifest of installed packages
cache
<downloaded packages>
build - content addressed hash
fajfola214o12
90823tjoag
...
## getting a module or actor
When a module <name/mod> is requested, from a within package <a> ..
1) cell looks within package <a> for a folder <name> and loads <name/mod>, if present
2) cell looks for a package <name> with a top level <mod>
3) cell looks in the core for <name/mod>

View File

@@ -10,6 +10,13 @@ var utf8 = use('utf8')
var blob = use('blob')
var build_utils = use('build')
function content_hash(content)
{
return text(crypto.blake2(utf8.encode(content)), 'h')
}
log.console(content_hash("hello"))
// a package string is what is used to import a module, like prosperon/sprite
// in prosperon/sprite, sprite is the module, and prosperon is the package (usually, an alias)
// a canonical package name relates prosperon to its source, like gitea.pockle.world/john/prosperon