# Testing Without Limits: Xk6 and K6 Extensions ![rw-book-cover](https://readwise-assets.s3.amazonaws.com/static/images/article1.be68295a7e40.png) URL:: https://k6.io/blog/extending-k6-with-xk6 Author:: Ivan Mirić ## Highlights > Go-based k6 extensions and import them as JS modules in your k6 script. ([View Highlight](https://instapaper.com/read/1367348480/14806972)) > Before this release, importing JavaScript libraries was the only possibility to extend k6. While this approach works in many cases, it has two significant limitations: > lack of JS support for system APIs. > performance penalties due to the JS runtime. ([View Highlight](https://instapaper.com/read/1367348480/14806977)) > Extensions allow the community to innovate and enable faster development ([View Highlight](https://instapaper.com/read/1367348480/14806984)) > Merging a change that could potentially affect thousands of other k6 users or introduce maintenance overheads is always a difficult proposition that k6 maintainers are very cautious about, which in some cases can cause delays in introducing new features. ([View Highlight](https://instapaper.com/read/1367348480/14806988)) > xk6 is an experimental framework for extending k6 that allows you to build a custom k6 binary by adding any combination of extensions easily, without any need to know how to code. For example, building a k6 v0.29.0 binary that allows you to use the SQL and Kafka extensions in your test scripts is as simple as: > $ xk6 build v0.29.0 \ > --with github.com/imiric/xk6-sql \ > --with github.com/mostafa/xk6-kafka ([View Highlight](https://instapaper.com/read/1367348480/14806994)) > This will build a k6 binary you can then use to run custom scripts that use the additional functionality. > $ ./k6 run some-script-with-sql-and-kafka.js ([View Highlight](https://instapaper.com/read/1367348480/14806997)) --- Title: Testing Without Limits: Xk6 and K6 Extensions Author: Ivan Mirić Tags: readwise, articles date: 2024-01-30 --- # Testing Without Limits: Xk6 and K6 Extensions ![rw-book-cover](https://readwise-assets.s3.amazonaws.com/static/images/article1.be68295a7e40.png) URL:: https://k6.io/blog/extending-k6-with-xk6 Author:: Ivan Mirić ## AI-Generated Summary None ## Highlights > Go-based k6 extensions and import them as JS modules in your k6 script. ([View Highlight](https://instapaper.com/read/1367348480/14806972)) > Before this release, importing JavaScript libraries was the only possibility to extend k6. While this approach works in many cases, it has two significant limitations: > lack of JS support for system APIs. > performance penalties due to the JS runtime. ([View Highlight](https://instapaper.com/read/1367348480/14806977)) > Extensions allow the community to innovate and enable faster development ([View Highlight](https://instapaper.com/read/1367348480/14806984)) > Merging a change that could potentially affect thousands of other k6 users or introduce maintenance overheads is always a difficult proposition that k6 maintainers are very cautious about, which in some cases can cause delays in introducing new features. ([View Highlight](https://instapaper.com/read/1367348480/14806988)) > xk6 is an experimental framework for extending k6 that allows you to build a custom k6 binary by adding any combination of extensions easily, without any need to know how to code. For example, building a k6 v0.29.0 binary that allows you to use the SQL and Kafka extensions in your test scripts is as simple as: > $ xk6 build v0.29.0 \ > --with github.com/imiric/xk6-sql \ > --with github.com/mostafa/xk6-kafka ([View Highlight](https://instapaper.com/read/1367348480/14806994)) > This will build a k6 binary you can then use to run custom scripts that use the additional functionality. > $ ./k6 run some-script-with-sql-and-kafka.js ([View Highlight](https://instapaper.com/read/1367348480/14806997))