polyfillpolyfill / polyfill-service

Automatic polyfill service.
https://polyfill.io/
MIT License
7.53k stars 740 forks source link

Building on a "not fastly" self hosted platform ? #2893

Open dewitpj opened 3 months ago

dewitpj commented 3 months ago

Hi,

As per the title, if I want to create a standalone version of the service, not using Fastly, how would I do that ?

Thanks

Daniel15 commented 3 months ago

You should be able to just compile and run the code in this repo.

dewitpj commented 3 months ago

= note: /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/service-8e8f911d0d26d236.1fk1d8otz33n5y13.rcgu.o: in functionfastly::kv_store::handle::StoreHandle::insert': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/kv_store/handle.rs:241: undefined reference to insert' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.03.rcgu.o): in functionfastly::kv_store::handle::StoreHandle::lookup': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/kv_store/handle.rs:167: undefined reference to lookup' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.03.rcgu.o): in functionfastly::kv_store::handle::StoreHandle::lookup_async': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/kv_store/handle.rs:190: undefined reference to lookup_async' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.03.rcgu.o): in functionfastly::kv_store::handle::StoreHandle::pending_lookup_wait': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/kv_store/handle.rs:221: undefined reference to pending_lookup_wait' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.03.rcgu.o): in functionfastly::secret_store::handle::SecretStoreHandle::get': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/secret_store/handle.rs:57: undefined reference to get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.03.rcgu.o): in functionfastly::secret_store::handle::SecretHandle::plaintext': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/secret_store/handle.rs:130: undefined reference to plaintext' /usr/bin/ld: /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/secret_store/handle.rs:146: undefined reference toplaintext' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::cache::core::handle::transaction_lookup': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/cache/core/handle.rs:180: undefined reference totransaction_lookup' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::cache::core::handle::CacheHandle::transaction_insert_and_stream_back': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/cache/core/handle.rs:250: undefined reference totransaction_insert_and_stream_back' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::cache::core::handle::CacheHandle::transaction_update': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/cache/core/handle.rs:265: undefined reference totransaction_update' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::cache::core::handle::CacheHandle::wait': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/cache/core/handle.rs:280: undefined reference toget_state' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::cache::core::handle::CacheHandle::get_state': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/cache/core/handle.rs:285: undefined reference toget_state' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::cache::core::handle::CacheHandle::get_body': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/cache/core/handle.rs:345: undefined reference toget_body' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::new': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:98: undefined reference tonew' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::get_header_names_impl::{{closure}}': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:129: undefined reference toheader_names_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::get_header_values_impl::{{closure}}': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:233: undefined reference toheader_values_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::set_header_values': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:281: undefined reference toheader_values_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::set_status': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:385: undefined reference tostatus_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::get_status': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:394: undefined reference tostatus_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::get_version': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:404: undefined reference toversion_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::set_version': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:417: undefined reference toversion_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::send_to_client': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:426: undefined reference tosend_downstream' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::stream_to_client': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:436: undefined reference tosend_downstream' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::set_framing_headers_mode': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:447: undefined reference toframing_headers_mode_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::response::handle::ResponseHandle::set_http_keepalive_mode': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/response/handle.rs:457: undefined reference tohttp_keepalive_mode_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::new': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:129: undefined reference tonew' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::get_header_names_impl::{{closure}}': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:160: undefined reference toheader_names_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::get_header_values_impl::{{closure}}': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:262: undefined reference toheader_values_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_header_values': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:311: undefined reference toheader_values_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::insert_header': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:364: undefined reference toheader_insert' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::get_version': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:417: undefined reference toversion_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_version': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:430: undefined reference toversion_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::get_method': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:444: undefined reference tomethod_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_method': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:499: undefined reference tomethod_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::get_url': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:517: undefined reference touri_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_url': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:577: undefined reference touri_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::send': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:594: undefined reference tosend_v2' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_cache_override': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:685: undefined reference tocache_override_v2_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_auto_decompress_response': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:730: undefined reference toauto_decompress_response_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::RequestHandle::set_framing_headers_mode': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:738: undefined reference toframing_headers_mode_set' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.06.rcgu.o): in function fastly::http::request::handle::client_request_and_body': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/request/handle.rs:764: undefined reference tobody_downstream_get' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.12.rcgu.o): in function fastly::init': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/lib.rs:62: undefined reference toinit' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.13.rcgu.o): in function fastly::http::body::handle::BodyHandle::new': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/body/handle.rs:114: undefined reference tonew' /usr/bin/ld: /home/build/polyfill/polyfill-service/target/debug/deps/libfastly-bbecba594c9d2a02.rlib(fastly-bbecba594c9d2a02.fastly.b24b9dddde758722-cgu.13.rcgu.o): in function fastly::http::body::handle::BodyHandle::append': /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-0.9.12/src/http/body/handle.rs:127: undefined reference toappend' collect2: error: ld returned 1 exit status

= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the -l flag to specify native libraries to link = note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)`

I get this :(

Daniel15 commented 3 months ago

Ah, sorry, looks like it changed to depend on Fastly at some point :/ Sorry for my incorrect comment.

Daniel15 commented 2 months ago

You might be able to use polyfill-library with Node.js: https://github.com/JakeChampion/polyfill-library