Skip to content

Commit b2f445f

Browse files
chore: initial setup
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 18ad933 commit b2f445f

File tree

9 files changed

+642
-1
lines changed

9 files changed

+642
-1
lines changed

lib/node_modules/@stdlib/blas/ext/base/dapx/manifest.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"options": {
3-
"task": "build"
3+
"task": "build",
4+
"wasm": false
45
},
56
"fields": [
67
{
@@ -27,6 +28,7 @@
2728
"confs": [
2829
{
2930
"task": "build",
31+
"wasm": false,
3032
"src": [
3133
"./src/main.c"
3234
],
@@ -47,6 +49,7 @@
4749
},
4850
{
4951
"task": "benchmark",
52+
"wasm": false,
5053
"src": [
5154
"./src/main.c"
5255
],
@@ -62,6 +65,25 @@
6265
},
6366
{
6467
"task": "examples",
68+
"wasm": false,
69+
"src": [
70+
"./src/main.c"
71+
],
72+
"include": [
73+
"./include"
74+
],
75+
"libraries": [],
76+
"libpath": [],
77+
"dependencies": [
78+
"@stdlib/math/base/assert/is-nan",
79+
"@stdlib/math/base/special/abs",
80+
"@stdlib/blas/base/shared",
81+
"@stdlib/strided/base/stride2offset"
82+
]
83+
},
84+
{
85+
"task": "build",
86+
"wasm": true,
6587
"src": [
6688
"./src/main.c"
6789
],
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"options": {},
3+
"fields": [
4+
{
5+
"field": "src",
6+
"resolve": true,
7+
"relative": true
8+
},
9+
{
10+
"field": "include",
11+
"resolve": true,
12+
"relative": true
13+
},
14+
{
15+
"field": "libraries",
16+
"resolve": false,
17+
"relative": false
18+
},
19+
{
20+
"field": "libpath",
21+
"resolve": true,
22+
"relative": false
23+
}
24+
],
25+
"confs": [
26+
{
27+
"src": [],
28+
"include": [],
29+
"libraries": [],
30+
"libpath": [],
31+
"dependencies": [
32+
"@stdlib/blas/ext/base/dapx"
33+
]
34+
}
35+
]
36+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "@stdlib/blas/base/ext/wasm/dapx",
3+
"version": "0.0.0",
4+
"description": "Adds a scalar constant to each element in a double-precision floating-point strided array.",
5+
"license": "Apache-2.0",
6+
"author": {
7+
"name": "The Stdlib Authors",
8+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9+
},
10+
"contributors": [
11+
{
12+
"name": "The Stdlib Authors",
13+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14+
}
15+
],
16+
"main": "./lib",
17+
"browser": {
18+
"./lib/binary.js": "./lib/binary.browser.js"
19+
},
20+
"directories": {
21+
"benchmark": "./benchmark",
22+
"doc": "./docs",
23+
"example": "./examples",
24+
"lib": "./lib",
25+
"scripts": "./scripts",
26+
"src": "./src",
27+
"test": "./test"
28+
},
29+
"types": "./docs/types",
30+
"scripts": {},
31+
"homepage": "https://github.com/stdlib-js/stdlib",
32+
"repository": {
33+
"type": "git",
34+
"url": "git://github.com/stdlib-js/stdlib.git"
35+
},
36+
"bugs": {
37+
"url": "https://github.com/stdlib-js/stdlib/issues"
38+
},
39+
"dependencies": {},
40+
"devDependencies": {},
41+
"engines": {
42+
"node": ">=0.10.0",
43+
"npm": ">2.7.0"
44+
},
45+
"os": [
46+
"aix",
47+
"darwin",
48+
"freebsd",
49+
"linux",
50+
"macos",
51+
"openbsd",
52+
"sunos",
53+
"win32",
54+
"windows"
55+
],
56+
"keywords": [
57+
"stdlib",
58+
"stdmath",
59+
"mathematics",
60+
"math",
61+
"blas",
62+
"extended",
63+
"level 1",
64+
"linear",
65+
"algebra",
66+
"subroutines",
67+
"strided",
68+
"vector",
69+
"array",
70+
"ndarray",
71+
"float64",
72+
"double",
73+
"float64array",
74+
"webassembly",
75+
"wasm"
76+
],
77+
"__stdlib__": {
78+
"wasm": true
79+
}
80+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* @license Apache-2.0
5+
*
6+
* Copyright (c) 2024 The Stdlib Authors.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
'use strict';
22+
23+
// MODULES //
24+
25+
var resolve = require( 'path' ).resolve;
26+
var readFile = require( '@stdlib/fs/read-file' ).sync;
27+
var writeFile = require( '@stdlib/fs/write-file' ).sync;
28+
var replace = require( '@stdlib/string/replace' );
29+
30+
31+
// VARIABLES //
32+
33+
var wpath = resolve( __dirname, '..', 'src', 'main.wasm' );
34+
var tpath = resolve( __dirname, 'template.txt' );
35+
var opath = resolve( __dirname, '..', 'lib', 'binary.browser.js' );
36+
37+
var opts = {
38+
'encoding': 'utf8'
39+
};
40+
41+
var PLACEHOLDER = '{{WASM_BASE64}}';
42+
43+
44+
// MAIN //
45+
46+
/**
47+
* Main execution sequence.
48+
*
49+
* @private
50+
*/
51+
function main() {
52+
var wasm;
53+
var tmpl;
54+
55+
wasm = readFile( wpath );
56+
tmpl = readFile( tpath, opts );
57+
58+
tmpl = replace( tmpl, PLACEHOLDER, wasm.toString( 'base64' ) );
59+
60+
writeFile( opath, tmpl, opts );
61+
}
62+
63+
main();
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var base64ToUint8Array = require( '@stdlib/string/base/base64-to-uint8array' );
24+
25+
26+
// MAIN //
27+
28+
var wasm = base64ToUint8Array( '{{WASM_BASE64}}' );
29+
30+
31+
// EXPORTS //
32+
33+
module.exports = wasm;

0 commit comments

Comments
 (0)