rust-ffi wasm is building

This commit is contained in:
Paweł Grabarz 2024-09-03 17:08:11 +02:00
parent 1c2b068623
commit fc4dba1856
24 changed files with 1132 additions and 2291 deletions

View File

@ -15,3 +15,15 @@ common --java_language_version=21
## Rust
startup --windows_enable_symlinks
build --enable_runfiles
## other
# build --experimental_output_directory_naming_scheme=diff_against_dynamic_baseline
# build --incompatible_disallow_empty_glob
# build --verbose_failures
# build --worker_sandboxing
# build:linux --sandbox_add_mount_pair=/tmp
# build:macos --sandbox_add_mount_pair=/var/tmp
# build:windows --sandbox_add_mount_pair=C:\Temp
# test --sandbox_default_allow_network=false
# test --test_output=errors

View File

@ -26,5 +26,9 @@
},
"vitest.workspaceConfig": "vitest.workspace.ts",
"metals.inlayHints.implicitArguments.enable": true,
"metals.inlayHints.implicitConversions.enable": true
"metals.inlayHints.implicitConversions.enable": true,
"files.associations": {
"curve25519_64.h": "c",
"curve25519_32.h": "c"
}
}

244
Cargo.lock generated
View File

@ -17,6 +17,12 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "adler2"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "afl"
version = "0.15.10"
@ -134,9 +140,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
[[package]]
name = "arrayvec"
version = "0.7.4"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "assert-json-diff"
@ -174,13 +180,13 @@ dependencies = [
[[package]]
name = "async-trait"
version = "0.1.81"
version = "0.1.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -559,7 +565,7 @@ dependencies = [
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"miniz_oxide 0.7.4",
"object",
"rustc-demangle",
]
@ -654,9 +660,12 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc"
[[package]]
name = "cc"
version = "1.1.10"
version = "1.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292"
checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
dependencies = [
"shlex",
]
[[package]]
name = "cesu8"
@ -703,9 +712,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.15"
version = "4.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc"
checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
dependencies = [
"clap_builder",
"clap_derive",
@ -733,7 +742,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -826,9 +835,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
version = "0.2.12"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad"
dependencies = [
"libc",
]
@ -1003,7 +1012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a183e141d0e543fe8abc96e0f06da25e3294284239260e50f63847f549d807a"
dependencies = [
"anyhow",
"clap 4.5.15",
"clap 4.5.16",
"crossbeam",
"crossbeam-channel",
"dataview",
@ -1039,7 +1048,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1090,7 +1099,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
"unicode-xid",
]
@ -1204,7 +1213,7 @@ dependencies = [
"base64 0.13.1",
"bytes",
"chrono",
"clap 4.5.15",
"clap 4.5.16",
"convert_case",
"derive-where",
"derive_more",
@ -1272,7 +1281,7 @@ name = "enso-build-cli"
version = "0.1.0"
dependencies = [
"anyhow",
"clap 4.5.15",
"clap 4.5.16",
"derive-where",
"enso-build",
"enso-build-base",
@ -1297,7 +1306,7 @@ dependencies = [
"quote",
"regex",
"serde_yaml",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1398,7 +1407,7 @@ version = "0.2.0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1409,7 +1418,7 @@ dependencies = [
"enso-macro-utils",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1459,7 +1468,7 @@ dependencies = [
name = "enso-parser-debug"
version = "0.1.0"
dependencies = [
"clap 4.5.15",
"clap 4.5.16",
"enso-metamodel",
"enso-metamodel-lexpr",
"enso-parser",
@ -1515,7 +1524,7 @@ dependencies = [
"enso-macro-utils",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1545,7 +1554,7 @@ version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1615,15 +1624,15 @@ dependencies = [
[[package]]
name = "fastrand"
version = "2.1.0"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "filetime"
version = "0.2.24"
version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550"
checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586"
dependencies = [
"cfg-if",
"libc",
@ -1633,12 +1642,12 @@ dependencies = [
[[package]]
name = "flate2"
version = "1.0.31"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920"
checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253"
dependencies = [
"crc32fast",
"miniz_oxide",
"miniz_oxide 0.8.0",
]
[[package]]
@ -1662,7 +1671,7 @@ checksum = "2cd66269887534af4b0c3e3337404591daa8dc8b9b2b3db71f9523beb4bafb41"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1782,7 +1791,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -1908,7 +1917,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
"indexmap 2.3.0",
"indexmap 2.5.0",
"slab",
"tokio",
"tokio-util",
@ -2185,7 +2194,7 @@ dependencies = [
"bincode",
"bytes",
"chrono",
"clap 4.5.15",
"clap 4.5.16",
"convert_case",
"data-encoding",
"dependency_runner",
@ -2268,9 +2277,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "2.3.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0"
checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
dependencies = [
"equivalent",
"hashbrown 0.14.5",
@ -2356,9 +2365,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "js-sys"
version = "0.3.69"
version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
dependencies = [
"wasm-bindgen",
]
@ -2416,9 +2425,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.155"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libm"
@ -2469,7 +2478,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
name = "logstat"
version = "0.1.0"
dependencies = [
"clap 4.5.15",
"clap 4.5.16",
"enso-prelude",
"lazy_static",
"regex",
@ -2524,6 +2533,16 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "minicov"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169"
dependencies = [
"cc",
"walkdir",
]
[[package]]
name = "miniz_oxide"
version = "0.7.4"
@ -2533,6 +2552,15 @@ dependencies = [
"adler",
]
[[package]]
name = "miniz_oxide"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
dependencies = [
"adler2",
]
[[package]]
name = "mio"
version = "1.0.2"
@ -2760,9 +2788,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
[[package]]
name = "object"
version = "0.36.3"
version = "0.36.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9"
checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
dependencies = [
"memchr",
]
@ -2819,7 +2847,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -2997,7 +3025,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -3028,7 +3056,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -3132,9 +3160,9 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.36"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@ -3251,9 +3279,9 @@ dependencies = [
[[package]]
name = "redox_users"
version = "0.4.5"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom 0.2.15",
"libredox",
@ -3411,18 +3439,18 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc_version"
version = "0.4.0"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
[[package]]
name = "rustix"
version = "0.38.34"
version = "0.38.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
dependencies = [
"bitflags 2.6.0",
"errno",
@ -3545,7 +3573,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -3592,13 +3620,13 @@ dependencies = [
[[package]]
name = "self-replace"
version = "1.4.0"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7828a58998685d8bf5a3c5e7a3379a5867289c20828c3ee436280b44b598515"
checksum = "03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7"
dependencies = [
"fastrand 1.9.0",
"fastrand 2.1.1",
"tempfile",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@ -3612,29 +3640,29 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.206"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284"
checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.206"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97"
checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
name = "serde_json"
version = "1.0.124"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d"
checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
dependencies = [
"itoa",
"memchr",
@ -3690,7 +3718,7 @@ version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
"indexmap 2.3.0",
"indexmap 2.5.0",
"itoa",
"ryu",
"serde",
@ -3903,7 +3931,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -3925,9 +3953,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.74"
version = "2.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
dependencies = [
"proc-macro2",
"quote",
@ -3994,7 +4022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
dependencies = [
"cfg-if",
"fastrand 2.1.0",
"fastrand 2.1.1",
"once_cell",
"rustix",
"windows-sys 0.59.0",
@ -4053,7 +4081,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -4123,9 +4151,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.39.2"
version = "1.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1"
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
dependencies = [
"backtrace",
"bytes",
@ -4148,7 +4176,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -4246,7 +4274,7 @@ version = "0.22.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d"
dependencies = [
"indexmap 2.3.0",
"indexmap 2.5.0",
"serde",
"serde_spanned",
"toml_datetime",
@ -4271,15 +4299,15 @@ dependencies = [
[[package]]
name = "tower-layer"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
[[package]]
name = "tower-service"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
@ -4301,7 +4329,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -4425,9 +4453,9 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
[[package]]
name = "unicode-xid"
version = "0.2.4"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a"
[[package]]
name = "unsafe-libyaml"
@ -4579,34 +4607,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
dependencies = [
"cfg-if",
"once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.42"
version = "0.4.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0"
checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed"
dependencies = [
"cfg-if",
"js-sys",
@ -4616,9 +4645,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -4626,31 +4655,32 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "wasm-bindgen-test"
version = "0.3.42"
version = "0.3.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b"
checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9"
dependencies = [
"console_error_panic_hook",
"js-sys",
"minicov",
"scoped-tls",
"wasm-bindgen",
"wasm-bindgen-futures",
@ -4659,13 +4689,13 @@ dependencies = [
[[package]]
name = "wasm-bindgen-test-macro"
version = "0.3.42"
version = "0.3.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0"
checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]
@ -4683,9 +4713,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.69"
version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef"
checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0"
dependencies = [
"js-sys",
"wasm-bindgen",
@ -5108,7 +5138,7 @@ name = "wstest"
version = "0.1.0"
dependencies = [
"base64 0.13.1",
"clap 4.5.15",
"clap 4.5.16",
"either",
"enso-prelude",
"futures",
@ -5161,7 +5191,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.74",
"syn 2.0.77",
]
[[package]]

View File

@ -123,7 +123,7 @@ tokio-util = { version = "0.7.10", features = ["full"] }
tracing = { version = "0.1.40" }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
walkdir = { version = "2.5.0" }
wasm-bindgen = { version = "0.2.92", default-features = false }
wasm-bindgen = { version = "0.2.93", default-features = false }
wasm-bindgen-test = { version = "0.3.34" }
windows = { version = "0.52.0", features = ["Win32_UI", "Win32_UI_Shell", "Win32_System_LibraryLoader", "Win32_System_Com"] }
winreg = { version = "0.52.0" }

View File

@ -4,8 +4,8 @@
### JavaScript ecosystem ###
############################
bazel_dep(name = "aspect_rules_js", version = "2.0.0-rc6")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0-rc0")
bazel_dep(name = "aspect_rules_js", version = "2.0.1")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0")
bazel_dep(name = "rules_nodejs", version = "6.2.0")
## Node.js
@ -18,9 +18,9 @@ npm.npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml", verify_nod
use_repo(npm, "npm")
## TypeScript
# rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
# rules_ts_ext.deps()
# use_repo(rules_ts_ext, "npm_typescript")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")
############
@ -30,11 +30,13 @@ bazel_dep(name = "rules_rust", version = "0.48.0")
single_version_override(module_name = "rules_rust", patches = ["patches/rules_rust_msvc_maxpath.patch"])
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(edition = "2021")
rust.toolchain(
edition = "2021",
versions = ["nightly/2024-08-08"],
extra_target_triples = ["wasm32-unknown-unknown"]
)
use_repo(rust, "rust_toolchains")
# manifests = use_extension("//:bazel_scripts/manifests.bzl", "manifests")
# manifests.manifests(manifest = "//:Cargo.toml")
register_toolchains("@rust_toolchains//:all")
# print( manifests.MANIFESTS )
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
@ -75,6 +77,31 @@ crate.from_cargo(
)
use_repo(crate, "crates")
wb_crates = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
wb_crates.from_cargo(
name = "wb_crates",
cargo_lockfile = "@wasm_bindgen_cli_crate//:Cargo.lock",
cargo_config = "//:.cargo/config.toml",
manifests = [
"@wasm_bindgen_cli_crate//:Cargo.toml",
],
)
use_repo(wb_crates, "wb_crates")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
WASM_BINDGEN_VERSION = "0.2.93"
http_archive(
name = "wasm_bindgen_cli_crate",
integrity = "sha256-uwX54YM2X1zzrATWC1Sw4z9JTpNzAme1r4JjNEPugDU=",
# sha256 = "08f61e21873f51e3059a8c7c3eef81ede7513d161cfc60751c7b2ffa6ed28270",
urls = ["https://static.crates.io/crates/wasm-bindgen-cli/wasm-bindgen-cli-{}.crate".format(WASM_BINDGEN_VERSION)],
type = "tar.gz",
strip_prefix = "wasm-bindgen-cli-{}".format(WASM_BINDGEN_VERSION),
build_file = "//toolchains/wasm_bindgen:BUILD.wasm-bindgen-cli.bazel",
)
register_toolchains("//toolchains/wasm_bindgen:cli")
register_toolchains("//toolchains/dummy_cc:dummy_cc_wasm32_toolchain")
###########
### JVM ###
###########

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,3 @@
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
ts_config(
name = "tsconfig",
src = "tsconfig.json",
visibility = [":__subpackages__"],
)
ts_config(name = "tsconfig", src = "tsconfig.json", visibility = [":__subpackages__"])

29
app/dashboard/BUILD.bazel Normal file
View File

@ -0,0 +1,29 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")
load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets")
npm_link_all_packages(name = "node_modules")
ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = ["//app:tsconfig"],
)
ts_project(
name = "tsc",
# allow_js = True,
composite = True,
resolve_json_module = True,
tsconfig = ":tsconfig",
deps = npm_link_targets()
)
npm_package(
name = "pkg",
srcs = [
"package.json",
":tsc",
],
visibility = ["//visibility:public"],
)

View File

@ -8,12 +8,12 @@
"./e2e/**/*.json",
"../../utils.ts",
".prettierrc.cjs",
"*.js",
"*.ts"
],
"exclude": ["./dist"],
"exclude": ["./dist", "vitest.config.ts"],
"compilerOptions": {
"composite": true,
"resolveJsonModule": true,
"noEmit": false,
"outDir": "../../node_modules/.cache/tsc",
"paths": { "#/*": ["./src/*"] },

View File

@ -1,29 +1,46 @@
load("@npm//:defs.bzl", "npm_link_all_packages")
npm_link_all_packages()
# load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets")
load("@npm//app/gui2:vite/package_json.bzl", vite_bin = "bin")
# load("@aspect_rules_js//npm:vitest/package_json.bzl", vitest_bin = "bin")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@aspect_rules_js//js:defs.bzl", "js_library")
npm_link_all_packages(name = "node_modules")
ts_config(name = "tsconfig", src = "tsconfig.json", deps = ["//app:tsconfig"])
ts_config(name = "tsconfig_node", src = "tsconfig.node.json", deps = [":tsconfig"])
ts_config(name = "tsconfig_app", src = "tsconfig.app.json", deps = [":tsconfig"])
ts_config(name = "tsconfig_app_vitest", src = "tsconfig.app.vitest.json", deps = [":tsconfig_app"])
SRCS = [
"package.json",
"//app:tsconfig",
":tsconfig_app",
":tsconfig_node",
"vite.config.ts",
"tsconfig.app.json",
"tsconfig.json",
] + glob(["src/**", "shared/**", "public/**", "ydoc-server/**"])
"package.json",
] + glob(["src/**", "shared/**", "public/**", "project-manager-shim-middleware/**"])
# BUILD_DEPS = []
# BUILD_DEPS = [":node_modules/" + d for d in [
# "@vitejs/plugin-vue",
# "@vue/tsconfig",
# "vite",
# "vue",
# "vue-router",
# ]]
# BUILD_DEPS = npm_link_targets()
BUILD_DEPS = npm_link_targets()
# print(BUILD_DEPS)
js_library(
name = "vite.config",
srcs = ["vite.config.ts"],
deps = BUILD_DEPS,
)
vite_bin.vite(
name = "build",
srcs = SRCS,
srcs = SRCS + [":vite.config"],
args = ["build"],
chdir = package_name(),
out_dirs = ["dist"],
out_dirs = ["dist"]
)
# vue_tsc_bin.vue_tsc_test(

View File

@ -9,7 +9,7 @@ js_library(
)
npm_package(
name = "package",
name = "pkg",
srcs = [":lib"],
include_runfiles = False,
visibility = ["//visibility:public"],

View File

@ -1,11 +1,11 @@
load("@rules_rust//rust:defs.bzl", "rust_shared_library")
# load("@rules_rust//wasm_bindgen/rules_nodejs:defs.bzl", "nodejs_rust_wasm_bindgen")
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("@rules_rust//wasm_bindgen:defs.bzl", "rust_wasm_bindgen")
load("@crates//:defs.bzl", "aliases", "all_crate_deps")
package(default_visibility = ["//visibility:public"])
rust_shared_library(
name = "rust-ffi",
name = "rust_lib",
srcs = glob(["src/**/*.rs"]),
aliases = aliases(),
edition = "2021",
@ -13,6 +13,26 @@ rust_shared_library(
deps = all_crate_deps(normal = True) + [
"//lib/rust/parser:enso-parser",
"//lib/rust/parser/doc-parser:enso-doc-parser",
# "@rules_rust//wasm_bindgen/3rdparty:wasm_bindgen",
],
)
rust_wasm_bindgen(
name = "rust-ffi-bindgen",
target = "bundler",
wasm_file = ":rust_lib",
)
js_library(
name = "rust-ffi",
srcs = [
":rust-ffi-bindgen",
"package.json"
],
)
npm_package(
name = "pkg",
srcs = [":rust-ffi"],
include_runfiles = False,
visibility = ["//visibility:public"],
)

View File

@ -8,7 +8,6 @@
"compile": "wasm-pack build . --release --out-dir pkg --target bundler",
"postinstall": "corepack pnpm compile"
},
"exports": {
".": "./pkg/rust_ffi.js"
}
"main":"rust-ffi-bindgen.js",
"typings": "rust-ffi-bindgen.d.ts"
}

View File

@ -0,0 +1,37 @@
load("@rules_cc//cc:defs.bzl", "cc_toolchain")
load(":dummy_cc_toolchain.bzl", "dummy_cc_config", "dummy_cc_toolchain")
dummy_cc_toolchain(name = "dummy_cc_wasm32")
# When compiling Rust code for wasm32, we avoid linking to cpp code so we introduce a dummy cc
# toolchain since we know we'll never look it up.
# TODO(jedmonds@spotify.com): Need to support linking C code to rust code when compiling for wasm32.
toolchain(
name = "dummy_cc_wasm32_toolchain",
target_compatible_with = ["@rules_rust//rust/platform/cpu:wasm32"],
toolchain = ":dummy_cc_wasm32_toolchain_cc",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
cc_toolchain(
name = "dummy_cc_wasm32_toolchain_cc",
all_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 0,
toolchain_config = ":cc_toolchain_config",
toolchain_identifier = "dummy_wasm32_cc",
)
dummy_cc_config(
name = "cc_toolchain_config",
)
filegroup(
name = "empty",
srcs = [],
visibility = ["//:__subpackages__"],
)

View File

@ -0,0 +1,30 @@
"""Cc toolchain definitions for use on wasm platforms"""
def _dummy_cc_toolchain_impl(_ctx):
# The `all_files` attribute is referenced by rustc_compile_action().
return [platform_common.ToolchainInfo(all_files = depset([]))]
dummy_cc_toolchain = rule(
implementation = _dummy_cc_toolchain_impl,
attrs = {},
)
# dummy values from https://bazel.build/tutorials/ccp-toolchain-config#configuring_the_c_toolchain
def _config_impl(ctx):
return cc_common.create_cc_toolchain_config_info(
ctx = ctx,
toolchain_identifier = "dummy-wasm32-cc-toolchain",
host_system_name = "unknown",
target_system_name = "unknown",
target_cpu = "unknown",
target_libc = "unknown",
compiler = "unknown",
abi_version = "unknown",
abi_libc_version = "unknown",
)
dummy_cc_config = rule(
implementation = _config_impl,
attrs = {},
provides = [CcToolchainConfigInfo],
)

View File

@ -0,0 +1,12 @@
load("@rules_rust//wasm_bindgen:defs.bzl", "rust_wasm_bindgen_toolchain")
rust_wasm_bindgen_toolchain(
name = "cli_impl",
bindgen = "@wasm_bindgen_cli_crate//:wasm-bindgen-cli",
)
toolchain(
name = "cli",
toolchain = "cli_impl",
toolchain_type = "@rules_rust//wasm_bindgen:toolchain_type",
)

View File

@ -9,7 +9,6 @@
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"allowJs": true,
"strict": true,
"noImplicitAny": true,
"exactOptionalPropertyTypes": true,
@ -17,8 +16,6 @@
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"removeComments": true,
"resolveJsonModule": true,
"sourceMap": true,
"skipLibCheck": true,
"target": "ES2021",
"jsx": "react-jsx"

View File

@ -0,0 +1,27 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")
load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets")
npm_link_all_packages(name = "node_modules")
ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = ["//app:tsconfig"],
)
ts_project(
name = "tsc",
composite = True,
tsconfig = ":tsconfig",
deps = npm_link_targets(),
)
npm_package(
name = "pkg",
srcs = [
"package.json",
":tsc",
],
visibility = ["//visibility:public"],
)

View File

@ -7,7 +7,7 @@
"noEmit": false,
"rootDir": "src",
"outDir": "dist",
"types": ["node", "vitest/importMeta"],
"types": ["node"],
"paths": { "#/*": ["./src/*"] }
}
}

View File

@ -0,0 +1,27 @@
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")
load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets")
npm_link_all_packages(name = "node_modules")
ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = ["//app:tsconfig"],
)
ts_project(
name = "tsc",
composite = True,
tsconfig = ":tsconfig",
deps = npm_link_targets(),
)
npm_package(
name = "pkg",
srcs = [
"package.json",
":tsc",
],
visibility = ["//visibility:public"],
)

View File

@ -0,0 +1,37 @@
load("@rules_cc//cc:defs.bzl", "cc_toolchain")
load(":dummy_cc_toolchain.bzl", "dummy_cc_config", "dummy_cc_toolchain")
dummy_cc_toolchain(name = "dummy_cc_wasm32")
# When compiling Rust code for wasm32, we avoid linking to cpp code so we introduce a dummy cc
# toolchain since we know we'll never look it up.
# TODO(jedmonds@spotify.com): Need to support linking C code to rust code when compiling for wasm32.
toolchain(
name = "dummy_cc_wasm32_toolchain",
target_compatible_with = ["@rules_rust//rust/platform/cpu:wasm32"],
toolchain = ":dummy_cc_wasm32_toolchain_cc",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
cc_toolchain(
name = "dummy_cc_wasm32_toolchain_cc",
all_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 0,
toolchain_config = ":cc_toolchain_config",
toolchain_identifier = "dummy_wasm32_cc",
)
dummy_cc_config(
name = "cc_toolchain_config",
)
filegroup(
name = "empty",
srcs = [],
visibility = ["//:__subpackages__"],
)

View File

@ -0,0 +1,30 @@
"""Cc toolchain definitions for use on wasm platforms"""
def _dummy_cc_toolchain_impl(_ctx):
# The `all_files` attribute is referenced by rustc_compile_action().
return [platform_common.ToolchainInfo(all_files = depset([]))]
dummy_cc_toolchain = rule(
implementation = _dummy_cc_toolchain_impl,
attrs = {},
)
# dummy values from https://bazel.build/tutorials/ccp-toolchain-config#configuring_the_c_toolchain
def _config_impl(ctx):
return cc_common.create_cc_toolchain_config_info(
ctx = ctx,
toolchain_identifier = "dummy-wasm32-cc-toolchain",
host_system_name = "unknown",
target_system_name = "unknown",
target_cpu = "unknown",
target_libc = "unknown",
compiler = "unknown",
abi_version = "unknown",
abi_libc_version = "unknown",
)
dummy_cc_config = rule(
implementation = _config_impl,
attrs = {},
provides = [CcToolchainConfigInfo],
)

View File

@ -0,0 +1,19 @@
load("@rules_rust//wasm_bindgen:defs.bzl", "rust_wasm_bindgen_toolchain")
rust_wasm_bindgen_toolchain(
name = "cli_impl",
bindgen = "@wasm_bindgen_cli_crate//:wasm-bindgen-cli"
# bindgen = select({
# "@rules_rust//rust/platform:aarch64-apple-darwin": "@wasm-bindgen-aarch64-apple-darwin//:all",
# "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": "@wasm-bindgen-aarch64-unknown-linux-gnu//:all",
# "@rules_rust//rust/platform:x86_64-apple-darwin": "@wasm-bindgen-x86_64-apple-darwin//:all",
# "@rules_rust//rust/platform:x86_64-pc-windows-msvc": "@wasm-bindgen-x86_64-pc-windows-msvc//:all",
# "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": "@wasm-bindgen-x86_64-unknown-linux-musl//:all",
# })
)
toolchain(
name = "cli",
toolchain = "cli_impl",
toolchain_type = "@rules_rust//wasm_bindgen:toolchain_type",
)

View File

@ -0,0 +1,26 @@
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("@wb_crates//:defs.bzl", "aliases", "all_crate_deps")
package(default_visibility = ["//visibility:public"])
exports_files([
"Cargo.toml",
"Cargo.lock",
])
rust_binary(
name = "wasm-bindgen-cli",
srcs = glob(["**/*.rs"]),
aliases = aliases(),
crate_features = [
],
crate_root = "src/bin/wasm-bindgen.rs",
data = [],
edition = "2021",
rustc_flags = [
# Don't produce warnings for this crate
"--cap-lints=allow",
],
deps = all_crate_deps(),
proc_macro_deps = all_crate_deps(proc_macro = True),
)