Skip to content
Merged
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
20 changes: 12 additions & 8 deletions build-tools/codecheck/codecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
import toml
import itertools
import fnmatch

SCALECODEC_RE = r'\bparity_scale_codec(_derive)?::'
JSONRPSEE_RE = r'\bjsonrpsee[_a-z0-9]*::'
Expand Down Expand Up @@ -201,7 +202,8 @@ def check_dependency_versions_patch_version():
result = True

for path in cargo_toml_files():
if any(os.path.samefile(path, exempted) for exempted in exempted_files):
if any(fnmatch.fnmatch(os.path.abspath(path), os.path.abspath(exempted))
for exempted in exempted_files):
continue

# load the file
Expand Down Expand Up @@ -254,7 +256,8 @@ def check_local_licenses():

ok = True
for path in rs_sources():
if any(os.path.samefile(path, exempted) for exempted in exempted_files):
if any(fnmatch.fnmatch(os.path.abspath(path), os.path.abspath(exempted))
for exempted in exempted_files):
continue

with open(path) as file:
Expand All @@ -276,7 +279,8 @@ def check_todos():

ok = True
for path in itertools.chain(rs_sources(), cargo_config_files()):
if any(os.path.samefile(path, exempted) for exempted in exempted_files):
if any(fnmatch.fnmatch(os.path.abspath(path), os.path.abspath(exempted))
for exempted in exempted_files):
continue

with open(path) as file:
Expand Down Expand Up @@ -307,11 +311,13 @@ def check_files_end_with_newline():

# list of files exempted from checks
exempted_files = [
'wasm-wrappers/doc/*',
]

ok = True
for path in sources_with_extensions([".toml",".rs",".py",".js",".yml",".yaml",".json",".htm",".html"]):
if any(os.path.samefile(path, exempted) for exempted in exempted_files):
if any(fnmatch.fnmatch(os.path.abspath(path), os.path.abspath(exempted))
for exempted in exempted_files):
continue

if file_ends_with_newline(path) is False:
Expand All @@ -331,14 +337,12 @@ def check_trailing_whitespaces():
'crypto/src/symkey/chacha20poly1305/XCHACHA20POLY1305_TEST_VECTORS.tv',
'script/src/test/test_vectors_4opc.csv.gz',
'wasm-wrappers/pkg/wasm_wrappers_bg.wasm',
'wasm-wrappers/doc/*',
]

ok = True
for path in all_files():
# Note: some of the paths in exempted_files are temporary build artifacts, which
# may not exist when this script is run; this is why we need the os.path.exists
# check here.
if any((os.path.exists(exempted) and os.path.samefile(path, exempted))
if any(fnmatch.fnmatch(os.path.abspath(path), os.path.abspath(exempted))
for exempted in exempted_files):
continue

Expand Down
6 changes: 5 additions & 1 deletion wasm-wrappers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ Finally, to run the example, run:
node js-bindings/node-entry.js
```

### Further documentation
### Further documentation on wasm

- https://developer.mozilla.org/en-US/docs/WebAssembly/Rust_to_wasm
- https://rustwasm.github.io/wasm-bindgen/introduction.html

### Mintlayer WASM Wrappers Function API documentation

[You can find the public functions documentations here](doc/wasm_wrappers/index.html)
1 change: 1 addition & 0 deletions wasm-wrappers/doc/crates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.ALL_CRATES = ["wasm_wrappers"];
2 changes: 2 additions & 0 deletions wasm-wrappers/doc/help.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="wasm_wrappers" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="./static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.76.0</span></h2></div><div class="version">(07dca489a 2024-02-04)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="./wasm_wrappers/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="./help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
5 changes: 5 additions & 0 deletions wasm-wrappers/doc/search-index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading