BOSTON — Tuukka Rask turned an outstanding first season as the Boston Bruins’ No. 1 goalie into a long-term commitment on Wednesday by signing an eight-year contract to stay with the Eastern Conference champions.There was little doubt that the restricted free agent would be back, especially after the Bruins cleared about $4.75 million in space under the salary cap when they sent Tyler Seguin to the Dallas Stars in a seven-player deal last Thursday.The Bruins said the annual salary cap charge on Rask’s contract is $7 million.Boston lost the Stanley Cup finals in six games to Chicago, dropping the finale 3-2 on June 24 when the Blackhawks came from behind and scored two goals in the last 1:16.Two days later, general manager Peter Chiarelli said, “I feel confident that we will get a deal done on Rask in short order.”That same day, Rask said he would like to play with the Bruins “forever,” and the one-year contract he played under last season motivated him.“You always try to be good but then you are trying to get your average game level as high as you can,” he said, “that the gap between a good game and a bad game wouldn’t be so big. I think I managed to do that this year, and it motivates me for the next year to keep that level and keep getting better.” Rask was the backup goalie in the 2011 postseason when Tim Thomas won the Conn Smythe Trophy that goes to the playoff MVP as Boston won its first Stanley Cup title since 1972. The following season, Thomas played 59 games with a 2.36 goals-against average. Rask made 23 appearances and had a 2.05 average.Thomas then decided to sit out the last season of his four-year, $20 million contract. The Bruins suspended him on Jan. 13 for failing to report and traded him on Feb. 7 to the New York Islanders. Thomas, now 39, didn’t play last season.Rask, 26, was a worthy successor. He was 19-10-5 with a 2.00 GAA in the regular season and then went 14-8 in the postseason with three shutouts and a 1.88 GAA.