Skip to content

Commit

Permalink
Merge remote-tracking branch 'locpyl-tidnyd/mingw-port' into jb/rc
Browse files Browse the repository at this point in the history
* locpyl-tidnyd/mingw-port: (136 commits)
  compat: minor refactoring
  compat: add m1brew
  compat: mingw: fix dependency patch path
  compat: mingw: put downloaded dependencies under $NIX_STORE (default to pkg/build so that git ignores them)
  compat: mingw: add seh_handler_decorator comments, move SEH handler to compat/mingw/seh_handler.c
  vere: update argon2u dependency to urbit/argon2@a4c1e3f7
  compat: fix missing newlines at end of file
  vere: ignore more intermediate build files
  vere: mingw: fix seh_handler_decorator.mk
  vere: mingw: get rid of libsigsegv
  vere: mingw: bump curl version and get rid of CURLOPT_SSL_CTX_FUNCTION typecheck warning
  vere: get rid of curl typecheck warnings for CURLOPT_WRITEFUNCTION
  mingw: add rsignal_raise to rsignal.h; raise on same thread
  u3: Makefile: include compat/*/*.mk
  mingw: rerun build action
  graph-validators: hotfix broken vale:dais caused by removal of +bunt from clay
  kiln: don't crash on fuse
  clay: formatting
  pill: update
  zuse: added +ram method to ordered map and made comments on methods accurate
  ...
  • Loading branch information
joemfb committed Jul 15, 2021
2 parents 991a231 + 5b4b6c6 commit 07e2a6b
Show file tree
Hide file tree
Showing 102 changed files with 5,267 additions and 1,001 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -116,3 +116,24 @@ jobs:
- run: nix-build -A hs.urbit-king.components.exes.urbit-king --arg enableStatic true
- run: nix-build -A hs-checks
- run: nix-build shell.nix

mingw:
runs-on: windows-latest
defaults:
run:
shell: C:\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -here -c ". <(cygpath '{0}')"
working-directory: ./pkg/urbit

steps:
- uses: actions/checkout@v2
with:
lfs: true

# echo suppresses pacman prompt
- run: echo|./configure
env:
CACHIX_CACHE: locpyl-tidnyd-test1
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

- run: make build/urbit build/urbit-worker
- run: build/urbit -l -d -B ../../bin/solid.pill -F bus && curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}' http://localhost:12321
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -54,6 +54,7 @@ release/
dist/
out/
work/
pkg/*/*.a
*.o

# Landscape Dev
Expand Down
4 changes: 2 additions & 2 deletions bin/solid.pill
Git LFS file not shown
90 changes: 90 additions & 0 deletions nix/sources-pmnsh.json
@@ -0,0 +1,90 @@
{
"curl": {
"branch": "master",
"description": "A command line tool and library for transferring data with URL syntax",
"homepage": "http://curl.se/",
"pmnsh": {
"include": "include",
"lib": "lib/.libs",
"prepare": "autoreconf -vfi && ./configure --disable-shared --disable-ldap --disable-rtsp --without-brotli --without-libidn2 --without-libpsl --without-nghttp2 --with-openssl",
"make": "-C lib libcurl.la"
},
"owner": "curl",
"repo": "curl",
"rev": "curl-7_77_0",
"type": "tarball",
"url": "https://github.com/curl/curl/archive/curl-7_77_0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"lmdb": {
"branch": "mdb.master",
"description": "LMDB library",
"homepage": "http://www.lmdb.tech/",
"pmnsh": {
"strip": 2,
"make": "liblmdb.a"
},
"owner": "LMDB",
"repo": "lmdb",
"rev": "48a7fed59a8aae623deff415dda27097198ca0c1",
"type": "tarball",
"url": "https://github.com/LMDB/lmdb/archive/48a7fed59a8aae623deff415dda27097198ca0c1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"secp256k1": {
"branch": "master",
"description": "Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1.",
"homepage": null,
"pmnsh": {
"include": "include",
"lib": ".libs",
"prepare": "./autogen.sh && ./configure --disable-shared --enable-module-recovery CFLAGS=-DSECP256K1_API=",
"make": "libsecp256k1.la"
},
"owner": "bitcoin-core",
"repo": "secp256k1",
"rev": "26de4dfeb1f1436dae1fcf17f57bdaa43540f940",
"type": "tarball",
"url": "https://github.com/bitcoin-core/secp256k1/archive/26de4dfeb1f1436dae1fcf17f57bdaa43540f940.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"uv": {
"branch": "v1.x",
"description": "Cross-platform asynchronous I/O",
"homepage": "http://libuv.org/",
"pmnsh": {
"include": "include",
"lib": ".libs",
"prepare": "./autogen.sh && ./configure --disable-shared",
"make": "libuv.la",
"compat": {
"m1brew": false
}
},
"owner": "libuv",
"repo": "libuv",
"rev": "v1.40.0",
"type": "tarball",
"url": "https://github.com/libuv/libuv/archive/v1.40.0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ent": {
"pmnsh": {
"prepare": "./configure"
}
},
"ge-additions": {
"pmnsh": {
"make": "CFLAGS=-I../ed25519"
}
},
"libaes_siv": {
"pmnsh": {
"compat": {
"m1brew": {
"make": "CFLAGS=$(pkg-config --cflags openssl)"
}
}
}
}
}
49 changes: 43 additions & 6 deletions nix/sources.json
Expand Up @@ -3,18 +3,26 @@
"branch": "master",
"description": "With argon2u. Based off https://github.com/P-H-C/phc-winner-argon2",
"homepage": "",
"pmnsh": {
"include": ["include", "src/blake2"],
"make": "libargon2.a"
},
"owner": "urbit",
"repo": "argon2",
"rev": "4da94a611ee62bad87ab2b131ffda3bcc0723d9c",
"sha256": "0bqq1hg367l4jkb6cqhxlblpvdbwz3l586qsfakwzfd9wdvnm3yc",
"rev": "a4c1e3f7138c2e577376beb99f964cf71e1c8b1b",
"sha256": "1j8a15fx2kn5aa3scmb5qnsfk627kfvsq5ppz9j0pv2d1xck527x",
"type": "tarball",
"url": "https://github.com/urbit/argon2/archive/4da94a611ee62bad87ab2b131ffda3bcc0723d9c.tar.gz",
"url": "https://github.com/urbit/argon2/archive/a4c1e3f7138c2e577376beb99f964cf71e1c8b1b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ed25519": {
"branch": "master",
"description": "Submodule included by Urbit",
"homepage": null,
"pmnsh": {
"strip": 1,
"make": "all"
},
"owner": "urbit",
"repo": "ed25519",
"rev": "76385f2ebbbc9580a9c236952d68d11d73a6135c",
Expand All @@ -24,15 +32,25 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"h2o": {
"branch": "v2.2.x",
"branch": "master",
"description": "H2O - the optimized HTTP/1, HTTP/2, HTTP/3 server",
"homepage": "https://h2o.examp1e.net",
"pmnsh": {
"include": "include",
"prepare": "cmake .",
"make": "libh2o",
"compat": {
"mingw": {
"prepare": "cmake -G\"MSYS Makefiles\" ."
}
}
},
"owner": "h2o",
"repo": "h2o",
"rev": "7359e98d78d018a35f5da7523feac69f64eddb4b",
"rev": "v2.2.6",
"sha256": "0qni676wqvxx0sl0pw9j0ph7zf2krrzqc1zwj73mgpdnsr8rsib7",
"type": "tarball",
"url": "https://github.com/h2o/h2o/archive/7359e98d78d018a35f5da7523feac69f64eddb4b.tar.gz",
"url": "https://github.com/h2o/h2o/archive/v2.2.6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"hackage.nix": {
Expand Down Expand Up @@ -63,6 +81,9 @@
"branch": "master",
"description": null,
"homepage": null,
"pmnsh": {
"make": "libscrypt.a CFLAGS_EXTRA=-ffast-math"
},
"owner": "urbit",
"repo": "libscrypt",
"rev": "029693ff1cbe4f69d3a2da87d0f4f034f92cc0c2",
Expand All @@ -75,6 +96,9 @@
"branch": "master",
"description": null,
"homepage": null,
"pmnsh": {
"make": "static"
},
"owner": "urbit",
"repo": "murmur3",
"rev": "71a75d57ca4e7ca0f7fc2fd84abd93595b0624ca",
Expand Down Expand Up @@ -111,6 +135,19 @@
"branch": "master",
"description": null,
"homepage": null,
"pmnsh": {
"include": "source/include",
"compat": {
"m1brew": {
"lib": "build/template-FAST_INT64",
"make": "-C build/template-FAST_INT64 libsoftfloat3.a"
},
"mingw": {
"lib": "build/Win64-MinGW-w64",
"make": "-C build/Win64-MinGW-w64 libsoftfloat3.a"
}
}
},
"owner": "urbit",
"repo": "berkeley-softfloat-3",
"rev": "ec4c7e31b32e07aad80e52f65ff46ac6d6aad986",
Expand Down
2 changes: 1 addition & 1 deletion pkg/arvo/app/dojo.hoon
Expand Up @@ -875,7 +875,7 @@
%ge (dy-run-generator (dy-cage p.p.p.bil) q.p.bil)
%sa
=+ .^(=dais:clay cb+(en-beam he-beak /[p.bil]))
(dy-hand p.bil bunt:dais)
(dy-hand p.bil *vale:dais)
::
%as
=/ cag=cage (dy-cage p.q.bil)
Expand Down
11 changes: 5 additions & 6 deletions pkg/arvo/app/graph-store.hoon
@@ -1,6 +1,5 @@
:: graph-store [landscape]
::
::
/+ store=graph-store, sigs=signatures, res=resource, default-agent, dbug, verb
~% %graph-store-top ..part ~
|%
Expand Down Expand Up @@ -724,7 +723,7 @@
:+ %add-nodes
[ship term]
%- ~(gas by *(map index:store node:store))
%+ turn (tap:orm `graph:store`(subset:orm p.u.graph start end))
%+ turn (tap:orm `graph:store`(lot:orm p.u.graph start end))
|= [=atom =node:store]
^- [index:store node:store]
[~[atom] node]
Expand Down Expand Up @@ -775,7 +774,7 @@
%+ turn
=- ?.(older (slag (safe-sub (lent -) count) -) (scag count -))
%- tap:orm
%+ subset:orm u.graph
%+ lot:orm u.graph
=/ idx
(snag (dec (lent index)) index)
?:(older [`idx ~] [~ `idx])
Expand Down Expand Up @@ -826,7 +825,7 @@
:+ %add-nodes
[ship term]
%- ~(gas by *(map index:store node:store))
%+ turn (tap:orm `graph:store`(subset:orm p.children.u.node end start))
%+ turn (tap:orm `graph:store`(lot:orm p.children.u.node end start))
|= [=atom =node:store]
^- [index:store node:store]
[(snoc index atom) node]
Expand All @@ -840,7 +839,7 @@
=/ update-log=(unit update-log:store) (~(get by update-logs) [ship term])
?~ update-log [~ ~]
:: orm-log is ordered backwards, so swap start and end
``noun+!>((subset:orm-log u.update-log end start))
``noun+!>((lot:orm-log u.update-log end start))
::
[%x %update-log @ @ ~]
=/ =ship (slav %p i.t.t.path)
Expand All @@ -858,7 +857,7 @@
%+ biff m-update-log
|= =update-log:store
=/ result=(unit [=time =update:store])
(peek:orm-log:store update-log)
(pry:orm-log:store update-log)
(bind result |=([=time update:store] time))
==
::
Expand Down
2 changes: 1 addition & 1 deletion pkg/arvo/app/hark-graph-hook.hoon
Expand Up @@ -256,7 +256,7 @@
=/ graph=graph:graph-store :: graph in subscription is bunted
(get-graph-mop:gra rid)
=/ node=(unit node:graph-store)
(bind (peek:orm:graph-store graph) |=([@ =node:graph-store] node))
(bind (pry:orm:graph-store graph) |=([@ =node:graph-store] node))
=/ assoc=(unit association:metadata)
(peek-association:met %graph rid)
=^ cards state
Expand Down
15 changes: 15 additions & 0 deletions pkg/arvo/gen/hood/fuse.hoon
@@ -0,0 +1,15 @@
:: Kiln: Fuse local desk from (optionally-)foreign sources
::
:::: /hoon/fuse/hood/gen
::
/* help-text %txt /gen/hood/fuse/help/txt
=, clay
::
::::
::
:- %say
|= [[now=@da eny=@uvJ bec=beak] [arg=[?(~ [des=desk bas=beak con=(list [beak germ]) ~])]] ~]
:- %kiln-fuse
?~ arg
((slog (turn `wain`help-text |=(=@t leaf+(trip t)))) ~)
[des bas con]:arg
8 changes: 8 additions & 0 deletions pkg/arvo/gen/hood/fuse/help.txt
@@ -0,0 +1,8 @@
Usage:

|fuse %destination-desk base-beak ~[[source-beak %some-germ] [another-beak %another-germ]]

A fuse replaces the contents of %destination-desk with the merge of the
specified beaks according to their merge strategies. This has no dependence
on the previous state of %destination-desk so any commits/work there will
be overwritten.
6 changes: 3 additions & 3 deletions pkg/arvo/gen/tally.hoon
@@ -1,5 +1,5 @@
/- gr=group, md=metadata-store, ga=graph-store
/+ re=resource
/+ re=resource, graph=graph-store
!:
:- %say
|= $: [now=@da eny=@uvJ =beak]
Expand Down Expand Up @@ -86,9 +86,9 @@
%+ scry update:ga
[%x %graph-store /graph/(scot %p entity.r)/[name.r]/noun]
?> ?=(%add-graph -.q.upd)
=/ mo ((ordered-map atom node:ga) gth)
=* mo orm:graph
=/ week=(list [@da node:ga])
(tap:mo (subset:mo graph.q.upd ~ `(sub now ~d7)))
(tap:mo (lot:mo graph.q.upd ~ `(sub now ~d7)))
:- (lent week)
%~ wyt in
%+ roll week
Expand Down
14 changes: 14 additions & 0 deletions pkg/arvo/lib/hood/kiln.hoon
Expand Up @@ -55,6 +55,12 @@
cas=case ::
gim=?(%auto germ) ::
==
+$ kiln-fuse
$@ ~
$: syd=desk
bas=beak
con=(list [beak germ])
==
--
|= [bowl:gall state]
?> =(src our)
Expand Down Expand Up @@ -381,6 +387,11 @@
?~ +< abet
abet:abet:(merge:(work syd) ali sud cas gim)
::
++ poke-fuse
|= k=kiln-fuse
?~ k abet
abet:(emit [%pass /kiln/fuse/[syd.k] %arvo %c [%fuse syd.k bas.k con.k]])
::
++ poke-cancel
|= a=@tas
abet:(emit %pass /cancel %arvo %c [%drop a])
Expand Down Expand Up @@ -430,6 +441,7 @@
%kiln-info =;(f (f !<(_+<.f vase)) poke-info)
%kiln-label =;(f (f !<(_+<.f vase)) poke-label)
%kiln-merge =;(f (f !<(_+<.f vase)) poke-merge)
%kiln-fuse =;(f (f !<(_+<.f vase)) poke-fuse)
%kiln-mount =;(f (f !<(_+<.f vase)) poke-mount)
%kiln-ota =;(f (f !<(_+<.f vase)) poke:update)
%kiln-ota-info =;(f (f !<(_+<.f vase)) poke-ota-info)
Expand Down Expand Up @@ -489,6 +501,8 @@
++ take |=(way=wire ?>(?=([@ ~] way) (work i.way))) :: general handler
++ take-mere ::
|= [way=wire are=(each (set path) (pair term tang))]
?. ?=([@ ~] way)
abet
abet:abet:(mere:(take way) are)
::
++ take-coup-fancy ::
Expand Down

0 comments on commit 07e2a6b

Please sign in to comment.