diff --git a/Cargo.lock b/Cargo.lock index eed2790a..c88e2223 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,15 +96,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bindgen" version = "0.69.4" @@ -244,7 +235,7 @@ version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn", @@ -256,6 +247,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + [[package]] name = "colorchoice" version = "1.0.1" @@ -290,18 +287,18 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cranelift-bforest" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b57d4f3ffc28bbd6ef1ca7b50b20126717232f97487efe027d135d9d87eb29c" +checksum = "29daf137addc15da6bab6eae2c4a11e274b1d270bf2759508e62f6145e863ef6" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f7d0ac7fd53f2c29db3ff9a063f6ff5a8be2abaa8f6942aceb6e1521e70df7" +checksum = "de619867d5de4c644b7fd9904d6e3295269c93d8a71013df796ab338681222d4" dependencies = [ "bumpalo", "cranelift-bforest", @@ -314,39 +311,40 @@ dependencies = [ "hashbrown 0.14.5", "log", "regalloc2", + "rustc-hash", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40bf21460a600178956cb7fd900a7408c6587fbb988a8063f7215361801a1da" +checksum = "29f5cf277490037d8dae9513d35e0ee8134670ae4a964a5ed5b198d4249d7c10" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d792ecc1243b7ebec4a7f77d9ed428ef27456eeb1f8c780587a6f5c38841be19" +checksum = "8c3e22ecad1123343a3c09ac6ecc532bb5c184b6fcb7888df0ea953727f79924" [[package]] name = "cranelift-control" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea2808043df964b73ad7582e09afbbe06a31f3fb9db834d53e74b4e16facaeb" +checksum = "53ca3ec6d30bce84ccf59c81fead4d16381a3ef0ef75e8403bc1e7385980da09" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1930946836da6f514da87625cd1a0331f3908e0de454628c24a0b97b130c4d4" +checksum = "7eabb8d36b0ca8906bec93c78ea516741cac2d7e6b266fa7b0ffddcc09004990" dependencies = [ "serde", "serde_derive", @@ -354,9 +352,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5482a5fcdf98f2f31b21093643bdcfe9030866b8be6481117022e7f52baa0f2b" +checksum = "44b42630229e49a8cfcae90bdc43c8c4c08f7a7aa4618b67f79265cd2f996dd2" dependencies = [ "cranelift-codegen", "log", @@ -366,15 +364,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6e1869b6053383bdb356900e42e33555b4c9ebee05699469b7c53cdafc82ea" +checksum = "918d1e36361805dfe0b6cdfd5a5ffdb5d03fa796170c5717d2727cbe623b93a0" [[package]] name = "cranelift-native" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91446e8045f1c4bc164b7bba68e2419c623904580d4b730877a663c6da38964" +checksum = "75aea85a0d7e1800b14ce9d3f53adf8ad4d1ee8a9e23b0269bdc50285e93b9b3" dependencies = [ "cranelift-codegen", "libc", @@ -383,9 +381,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.106.2" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b17979b862d3b0d52de6ae3294ffe4d86c36027b56ad0443a7c8c8f921d14f" +checksum = "dac491fd3473944781f0cf9528c90cc899d18ad438da21961a839a3a44d57dfb" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -393,7 +391,7 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser 0.201.0", + "wasmparser 0.207.0", "wasmtime-types", ] @@ -459,6 +457,12 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + [[package]] name = "equivalent" version = "1.0.1" @@ -579,6 +583,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "heck" version = "0.5.0" @@ -609,6 +619,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + [[package]] name = "idna" version = "0.5.0" @@ -745,6 +761,12 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libredox" version = "0.1.3" @@ -794,10 +816,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] -name = "mach" -version = "0.3.2" +name = "mach2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ "libc", ] @@ -896,9 +918,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d" dependencies = [ "crc32fast", "hashbrown 0.14.5", @@ -960,6 +982,17 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "postcard" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +dependencies = [ + "cobs", + "embedded-io", + "serde", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1215,6 +1248,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "sptr" @@ -1398,7 +1434,7 @@ dependencies = [ "dirs", "filetime", "glob", - "heck", + "heck 0.5.0", "html-escape", "indexmap", "indoc", @@ -1516,6 +1552,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + [[package]] name = "unindent" version = "0.2.3" @@ -1629,24 +1671,13 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-encoder" -version = "0.201.0" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a" +checksum = "d996306fb3aeaee0d9157adbe2f670df0236caf19f6728b221e92d0f27b3fe17" dependencies = [ "leb128", ] -[[package]] -name = "wasmparser" -version = "0.201.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" -dependencies = [ - "bitflags 2.5.0", - "indexmap", - "semver", -] - [[package]] name = "wasmparser" version = "0.206.0" @@ -1661,50 +1692,82 @@ dependencies = [ ] [[package]] -name = "wasmtime" -version = "19.0.2" +name = "wasmparser" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e300c0e3f19dc9064e3b17ce661088646c70dbdde36aab46470ed68ba58db7d" +checksum = "e19bb9f8ab07616da582ef8adb24c54f1424c7ec876720b7da9db8ec0626c92c" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "hashbrown 0.14.5", + "indexmap", + "semver", +] + +[[package]] +name = "wasmprinter" +version = "0.207.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c2d8a7b4dabb460208e6b4334d9db5766e84505038b2529e69c3d07ac619115" +dependencies = [ + "anyhow", + "wasmparser 0.207.0", +] + +[[package]] +name = "wasmtime" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f92a1370c66a0022e6d92dcc277e2c84f5dece19569670b8ce7db8162560d8b6" dependencies = [ "anyhow", - "bincode", "bumpalo", + "cc", "cfg-if", - "gimli", + "hashbrown 0.14.5", "indexmap", "libc", + "libm", "log", + "mach2", + "memfd", + "memoffset", "object", "once_cell", "paste", + "postcard", + "psm", "rustix", "serde", "serde_derive", - "serde_json", + "smallvec", + "sptr", "target-lexicon", - "wasmparser 0.201.0", + "wasmparser 0.207.0", + "wasmtime-asm-macros", + "wasmtime-component-macro", "wasmtime-cranelift", "wasmtime-environ", "wasmtime-jit-icache-coherence", - "wasmtime-runtime", "wasmtime-slab", + "wasmtime-versioned-export-macros", "windows-sys 0.52.0", ] [[package]] name = "wasmtime-asm-macros" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110aa598e02a136fb095ca70fa96367fc16bab55256a131e66f9b58f16c73daf" +checksum = "6dee8679c974a7f258c03d60d3c747c426ed219945b6d08cbc77fd2eab15b2d1" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-c-api-impl" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be684dae96dc2d371317848f352135333fcefc3483b67ade73031f9cdbbae52e" +checksum = "76af8b62c8d2814b7d5975c5dc140122e4c086150db6c15d25a4b76f11c929dd" dependencies = [ "anyhow", "log", @@ -1716,19 +1779,40 @@ dependencies = [ [[package]] name = "wasmtime-c-api-macros" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab36d96e82e247a44b0500d8e1ccc103da5d24da017f5466d0d8cb6a1b2383f8" +checksum = "d74b92f917c9ced9c6262a00e9cb982ebac183e6900b4d44e2480f936b9495eb" dependencies = [ "proc-macro2", "quote", ] [[package]] -name = "wasmtime-cranelift" -version = "19.0.2" +name = "wasmtime-component-macro" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e923262451a4b5b39fe02f69f1338d56356db470e289ea1887346b9c7f592738" +checksum = "32cae30035f1cf97dcc6657c979cf39f99ce6be93583675eddf4aeaa5548509c" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn", + "wasmtime-component-util", + "wasmtime-wit-bindgen", + "wit-parser", +] + +[[package]] +name = "wasmtime-component-util" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7ae611f08cea620c67330925be28a96115bf01f8f393a6cbdf4856a86087134" + +[[package]] +name = "wasmtime-cranelift" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2909406a6007e28be964067167890bca4574bd48a9ff18f1fa9f4856d89ea40" dependencies = [ "anyhow", "cfg-if", @@ -1743,111 +1827,69 @@ dependencies = [ "object", "target-lexicon", "thiserror", - "wasmparser 0.201.0", - "wasmtime-cranelift-shared", + "wasmparser 0.207.0", "wasmtime-environ", "wasmtime-versioned-export-macros", ] -[[package]] -name = "wasmtime-cranelift-shared" -version = "19.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508898cbbea0df81a5d29cfc1c7c72431a1bc4c9e89fd9514b4c868474c05c7a" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli", - "object", - "target-lexicon", - "wasmtime-environ", -] - [[package]] name = "wasmtime-environ" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e3f2aa72dbb64c19708646e1ff97650f34e254598b82bad5578ea9c80edd30" +checksum = "40e227f9ed2f5421473723d6c0352b5986e6e6044fde5410a274a394d726108f" dependencies = [ "anyhow", - "bincode", "cranelift-entity", "gimli", "indexmap", "log", "object", + "postcard", "serde", "serde_derive", "target-lexicon", - "thiserror", - "wasmparser 0.201.0", + "wasm-encoder", + "wasmparser 0.207.0", + "wasmprinter", "wasmtime-types", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22ca2ef4d87b23d400660373453e274b2251bc2d674e3102497f690135e04b0" -dependencies = [ - "cfg-if", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "wasmtime-runtime" -version = "19.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1806ee242ca4fd183309b7406e4e83ae7739b7569f395d56700de7c7ef9f5eb8" +checksum = "afe088f9b56bb353adaf837bf7e10f1c2e1676719dd5be4cac8e37f2ba1ee5bc" dependencies = [ "anyhow", - "cc", "cfg-if", - "indexmap", "libc", - "log", - "mach", - "memfd", - "memoffset", - "paste", - "psm", - "rustix", - "sptr", - "wasm-encoder", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-versioned-export-macros", - "wasmtime-wmemcheck", "windows-sys 0.52.0", ] [[package]] name = "wasmtime-slab" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c58bef9ce877fd06acb58f08d003af17cb05cc51225b455e999fbad8e584c0" +checksum = "4ff75cafffe47b04b036385ce3710f209153525b0ed19d57b0cf44a22d446460" [[package]] name = "wasmtime-types" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cebe297aa063136d9d2e5b347c1528868aa43c2c8d0e1eb0eec144567e38fe0f" +checksum = "2f2fa462bfea3220711c84e2b549f147e4df89eeb49b8a2a3d89148f6cc4a8b1" dependencies = [ "cranelift-entity", "serde", "serde_derive", - "thiserror", - "wasmparser 0.201.0", + "smallvec", + "wasmparser 0.207.0", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "19.0.2" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaafa5c12355b1a9ee068e9295d50c4ca0a400c721950cdae4f5b54391a2da5" +checksum = "d4cedc5bfef3db2a85522ee38564b47ef3b7fc7c92e94cacbce99808e63cdd47" dependencies = [ "proc-macro2", "quote", @@ -1855,10 +1897,16 @@ dependencies = [ ] [[package]] -name = "wasmtime-wmemcheck" -version = "19.0.2" +name = "wasmtime-wit-bindgen" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a8c62e9df8322b2166d2a6f096fbec195ddb093748fd74170dcf25ef596769" +checksum = "c936a52ce69c28de2aa3b5fb4f2dbbb2966df304f04cccb7aca4ba56d915fda0" +dependencies = [ + "anyhow", + "heck 0.4.1", + "indexmap", + "wit-parser", +] [[package]] name = "web-sys" @@ -2123,6 +2171,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-parser" +version = "0.207.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c83dab33a9618d86cfe3563cc864deffd08c17efc5db31a3b7cd1edeffe6e1" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.207.0", +] + [[package]] name = "xtask" version = "0.1.0" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 8db62ce7..870f5c2d 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -33,7 +33,7 @@ regex.workspace = true tree-sitter-language = { version = "0.1", path = "language" } [dependencies.wasmtime-c-api] -version = "19" +version = "21.0.1" optional = true package = "wasmtime-c-api-impl" default-features = false diff --git a/lib/binding_rust/build.rs b/lib/binding_rust/build.rs index ce4198bc..e7a4b1eb 100644 --- a/lib/binding_rust/build.rs +++ b/lib/binding_rust/build.rs @@ -19,8 +19,7 @@ fn main() { config .define("TREE_SITTER_FEATURE_WASM", "") .define("static_assert(...)", "") - .include(env::var("DEP_WASMTIME_C_API_INCLUDE").unwrap()) - .include(env::var("DEP_WASMTIME_C_API_WASM_INCLUDE").unwrap()); + .include(env::var("DEP_WASMTIME_C_API_INCLUDE").unwrap()); } let manifest_path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); diff --git a/lib/src/wasm_store.c b/lib/src/wasm_store.c index 374c352d..b3455fc6 100644 --- a/lib/src/wasm_store.c +++ b/lib/src/wasm_store.c @@ -4,16 +4,17 @@ #ifdef TREE_SITTER_FEATURE_WASM -#include -#include -#include #include "./alloc.h" #include "./array.h" #include "./atomic.h" #include "./language.h" #include "./lexer.h" -#include "./wasm_store.h" #include "./wasm/wasm-stdlib.h" +#include "./wasm_store.h" + +#include +#include +#include #define array_len(a) (sizeof(a) / sizeof(a[0])) @@ -457,7 +458,7 @@ static wasmtime_extern_t get_builtin_extern( .kind = WASMTIME_EXTERN_FUNC, .of.func = (wasmtime_func_t) { .store_id = table->store_id, - .index = index + .__private = index } }; } @@ -634,14 +635,14 @@ TSWasmStore *ts_wasm_store_new(TSWasmEngine *engine, TSWasmError *wasm_error) { FunctionDefinition *definition = &builtin_definitions[i]; wasmtime_func_t func; wasmtime_func_new_unchecked(context, definition->type, definition->callback, self, NULL, &func); - *definition->storage_location = func.index; + *definition->storage_location = func.__private; wasm_functype_delete(definition->type); } for (unsigned i = 0; i < lexer_definitions_len; i++) { FunctionDefinition *definition = &lexer_definitions[i]; wasmtime_func_t func; wasmtime_func_new_unchecked(context, definition->type, definition->callback, self, NULL, &func); - *definition->storage_location = func.index; + *definition->storage_location = func.__private; wasm_functype_delete(definition->type); } @@ -824,13 +825,13 @@ TSWasmStore *ts_wasm_store_new(TSWasmEngine *engine, TSWasmError *wasm_error) { } if (name_eq(name, "reset_heap")) { - self->builtin_fn_indices.reset_heap = export.of.func.index; + self->builtin_fn_indices.reset_heap = export.of.func.__private; continue; } for (unsigned j = 0; j < stdlib_symbols_len; j++) { if (name_eq(name, STDLIB_SYMBOLS[j])) { - self->stdlib_fn_indices[j] = export.of.func.index; + self->stdlib_fn_indices[j] = export.of.func.__private; break; } }